Results 1 to 3 of 3

Thread: Drop down menu w/ description

  1. #1
    Join Date
    Sep 2005
    Location
    Nova Scotia, Canada
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Drop down menu w/ description

    http://www.dynamicdrive.com/dynamici...bodescribe.htm

    Can this menu be edited so the links are targeted to a frame, ie main?
    If someone can help me, that would be wonderful.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Change this:
    Code:
    function jumptolink(what){
    var selectedopt=what.options[what.selectedIndex]
    if (document.getElementById && selectedopt.getAttribute("target")=="newwin")
    window.open(selectedopt.value)
    else
    window.location=selectedopt.value
    }
    to:
    Code:
    function jumptolink(what){
    var selectedopt=what.options[what.selectedIndex]
    if (document.getElementById && selectedopt.getAttribute("target")=="newwin")
    window.open(selectedopt.value)
    else if (selectedopt.getAttribute("target")==null||selectedopt.getAttribute("target")=='')
    window.location=selectedopt.value
    else
    parent.window[selectedopt.getAttribute("target")].location=selectedopt.value
    }
    Then as in the example where you can use target="newwin", you may now use a frame or iframe name as well. May cause problems in some older browsers.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Sep 2005
    Location
    Nova Scotia, Canada
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks a bunch!

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
  •