Results 1 to 3 of 3

Thread: Can this script be made to work with internal links

  1. #1
    Join Date
    Jan 2011
    Location
    Southeastern CT
    Posts
    612
    Thanks
    46
    Thanked 32 Times in 32 Posts

    Default Can this script be made to work with internal links

    http://www.dynamicdrive.com/dynamici...menu/index.htm

    Instead of links to external web pages.

    I am going to experiment with one that starts with 5-6 catergories that would list the internal links to several places on the wepage.I need to try and do this due to the rather lengthy size of the page.This would make it so much easier to navigate to any section at ease ( there would also be links"top" to return to the top to make further selections inside the page)

    If possible the selection from the second ( and last list ) needs to automaticly take you to the internal target.

    I know how to do the internal links but not how ( if possible to set a drop down selection to go to the selected target.


    Bud

  2. #2
    Join Date
    Jan 2011
    Location
    Southeastern CT
    Posts
    612
    Thanks
    46
    Thanked 32 Times in 32 Posts

    Default the answer is yes

    Just us the same internal links as the url in the final dropdown with the # and it will take you to that anchor in the page.

    I was so happy to get this to work as I wish to use it.

    thanks,

    Bud

  3. #3
    Join Date
    Dec 2008
    Location
    Portsmouth, UK
    Posts
    1,891
    Thanks
    2
    Thanked 441 Times in 435 Posts

    Default

    change this function

    Code:
    function cs_updateList() {
      var content=this.content;
      for (var i=0; i<content.lists.length; i++) {
        if (content.lists[i]==this) {
          if (content.cookie) {
            cs_setCookie(content.cookie+"_"+i,this.selectedIndex);
          }
          if (i<content.lists.length-1) {
            cs_updateListGroup(content,i,this.selectedIndex,"");
          }
          if (i==2&&content.lists[2].value){
           window.top.location=content.lists[2].value;
          }
        }
      }
    }
    Vic
    God Loves You and will never love you less.
    http://www.vicsjavascripts.org/Home.htm
    If my post has been useful please donate to http://www.operationsmile.org.uk/

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •