drop down menu

K

Kian

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>
 
K

Kris

Kian said:
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.
 
J

Jim Grimble

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

Kian wrote in message ...
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
473,769
Messages
2,569,577
Members
45,052
Latest member
LucyCarper

Latest Threads

Top