Results 1 to 6 of 6

Thread: Drop-down Menu

  1. #1
    Join Date
    Nov 2009
    Location
    Isfahan, Iran
    Posts
    229
    Thanks
    46
    Thanked 1 Time in 1 Post

    Default Drop-down Menu

    Hi,

    Please look at the following drop-down menu:
    http://www.w3schools.com/JS/tryit.as...yjs_selectmenu

    1. How can I set it so the pages open in the parent frame (instead of the same frame)?
    2. How can I set it so the pages open in a new window?


    Regards
    Rain Lover
    Last edited by Rain Lover; 01-21-2010 at 03:52 AM.

  2. #2
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Parent frame:
    Code:
    window.parent.location=document.getElementById("menu").value;
    [/code]

    New window:
    Code:
    window.open(document.getElementById("menu").value, document.getElementById("menu").firstChild.nodeValue);
    Jeremy | jfein.net

  3. #3
    Join Date
    Nov 2009
    Location
    Isfahan, Iran
    Posts
    229
    Thanks
    46
    Thanked 1 Time in 1 Post

    Default Thanks!

    It seems that the following work too:

    parent frame:
    HTML Code:
    parent.location=document.getElementById("menu").value;

    a new window:
    HTML Code:
    window.open(document.getElementById("menu").value);


    If there's something wrong with them, please do let me know.

  4. #4
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Nothing wrong...
    Jeremy | jfein.net

  5. #5
    Join Date
    Nov 2009
    Location
    Isfahan, Iran
    Posts
    229
    Thanks
    46
    Thanked 1 Time in 1 Post

    Default

    Thanks Nile!

  6. #6
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Glad to help you! Your welcome!

    It seems your topic is solved... Please set the status to resolved.. To do this:
    Go to your first post ->
    Edit your first post ->
    Click "Go Advanced" ->
    Then in the drop down next to the title, select "RESOLVED"
    Jeremy | jfein.net

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
  •