drop down menu

Discussion in 'HTML' started by Kian, Jul 31, 2003.

  1. Kian

    Kian Guest

    Hi,

    I wonder if anyone can help me on my problem...
    My drop down menu below is working ok. Can anyone tell me how can I add
    target="_top" attribute into the code below??

    Thanks,
    Kian
    ==================================

    <script language="JavaScript">
    <!--
    function goToURL(form)
    {
    var myindex=form.dropdownmenu.selectedIndex
    if(!myindex=="")
    {window.location.href=form.dropdownmenu.options[myindex].value;}
    }
    -->
    </script>
    <select name="dropdownmenu" size="1" onChange="goToURL(this.form)">
    <option selected value="">
    Go to...
    <option value="http://www.black.com/">
    Black
    <option value="http://www.yello.com">
    Yellow
    <option value="http://www.red.com">
    Red
    </select>
     
    Kian, Jul 31, 2003
    #1
    1. Advertising

  2. Kian

    Kris Guest

    In article
    <bPbWa.31867$>,
    "Kian" <> wrote:

    > Hi,
    >
    > I wonder if anyone can help me on my problem...
    > My drop down menu below is working ok. Can anyone tell me how can I add
    > target="_top" attribute into the code below??


    <snip HTML/JS of inaccessible/unreliable SELECT navigation>

    <ul>
    <li><a href="foo.html" target="_top">foo</a></li>
    <li><a href="foo.html" target="_top">foo</a></li>
    <li><a href="foo.html" target="_top">foo</a></li>
    <li><a href="foo.html" target="_top">foo</a></li>
    </ul>

    Or you drop the frames and don't have to bother with _top at all to
    start with.

    --
    Kris
    erlands (nl)
    "We called him Tortoise because he taught us" said the Mock Turtle.
     
    Kris, Jul 31, 2003
    #2
    1. Advertising

  3. Kian

    Jim Grimble Guest

    top.location.href=form.dropdownmenu.options[myindex].value ;

    Kian wrote in message ...
    >Hi,
    >
    >I wonder if anyone can help me on my problem...
    >My drop down menu below is working ok. Can anyone tell me how can I add
    >target="_top" attribute into the code below??
    >
    >Thanks,
    >Kian
    >==================================
    >
    ><script language="JavaScript">
    ><!--
    >function goToURL(form)
    >{
    >var myindex=form.dropdownmenu.selectedIndex
    >if(!myindex=="")
    >{window.location.href=form.dropdownmenu.options[myindex].value;}
    >}
    >-->
    ></script>
    ><select name="dropdownmenu" size="1" onChange="goToURL(this.form)">
    > <option selected value="">
    > Go to...
    > <option value="http://www.black.com/">
    > Black
    > <option value="http://www.yello.com">
    > Yellow
    > <option value="http://www.red.com">
    > Red
    ></select>
    >
    >
     
    Jim Grimble, Jul 31, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. SirPoonga
    Replies:
    2
    Views:
    799
    Ben Strackany
    Jan 7, 2005
  2. weiwei
    Replies:
    0
    Views:
    1,047
    weiwei
    Jan 5, 2007
  3. msimmons
    Replies:
    0
    Views:
    514
    msimmons
    Jul 16, 2009
  4. Replies:
    5
    Views:
    295
  5. Replies:
    3
    Views:
    312
Loading...

Share This Page