![]() |
Drop-down menu
Is it possible to have links from a drop-down menu open in a new window?
If yes....how do you do it? |
|
thank you very much :thumbsup
|
My pleasure :winkwink:
|
it does not work.....links open in the main window....I want to know if it's possible to make them open in a new window
|
Nobody can tell?
|
Ah, then change this
Code:
window.location.href = object.options[object.selectedIndex].value;Code:
window.open(object.options[object.selectedIndex].value); |
Put this in between your <head></head> tags
<script> <!-- function land(ref, target) { lowtarget=target.toLowerCase(); if (lowtargethahahaha"_self") {window.location=loc;} else {if (lowtargethahahaha"_top") {top.location=loc;} else {if (lowtargethahahaha"_blank") {window.open(loc);} else {if (lowtargethahahaha"_parent") {parent.location=loc;} else {parent.frames[target].location=loc;}; }}} } function jump(menu) { ref=menu.choice.options[menu.choice.selectedIndex].value; splitc=ref.lastIndexOf("*"); target=""; if (splitc!=-1) {loc=ref.substring(0,splitc); target=ref.substring(splitc+1,1000);} else {loc=ref; target="_self";}; if (ref != "") {land(loc,target);} } //--> </script> and this anywhere you want it <form action="dummy" method=hahahahahaha><select name="choice" size="1"> <option value="">Text</option> <option value="http://yourURL.com*_blank">Your Text</option> <option value="http://yourURL2.com*_blank">Your Text 2</option> <option value="">----------</option> </select><br><input TYPE="button" VALUE="Go" onClick="jump(this.form)"></form> add *_blank to the end of the URLs you put in the menu. EDIT: Replace the hahahahahah^ above (it got filtered) with method = " post " (no spaces!) |
|
ugh... that whole script I posted is filtered... *SiGH*
|
Here you go Unfiltered version <- there's the unfiltered version... I didn't know GFY had all those things on lockdown... lol :)
|
| All times are GMT -7. The time now is 12:04 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2026, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123