View Single Post
Old 06-05-2003, 09:11 PM  
michaelw
Confirmed User
 
Join Date: May 2002
Location: Calgary, Canada
Posts: 1,342
Quote:
Originally posted by psyko514
I have a drop down menu that loads the links automatically when an option is selected in the menu.

I'm using this line:
(form)
(select name="SiteMap" onchange="if(options[selectedIndex].value){location = options[selectedIndex].value; target=_TOP}" size="1")
(option value="http://link.com")LINK(/option)
(option value="http://link2.com")LINK 2(/option)
(/select)
(/form)

and the link opens in the same window...

now how do I go about opening the link in a new window? setting the target to _NEW or _BLANK doesn't seem to work.
replace
onchange="if(options[selectedIndex].value){location = options[selectedIndex].value; target=_TOP}" size="1")

with something like
onchange="if(options[selectedIndex].value){
window.open(location)
}" size="1")
__________________
<b><a href="http://www.hotlinkprotector.com"><font color="yellow">Hotlink Protector</font></a> - Protect all your file types from hotlinking the professional way. <br>
See a demo <a href="http://www.hotlinkprotector.com/demo.html"><font color="yellow">here</font></a>, and testimonials <a href="http://www.hotlinkprotector.com/testimonials.html"><font color="yellow">here</font></a><br>ICQ: 146423631
michaelw is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote