GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Drop-down menu (https://gfy.com/showthread.php?t=419475)

Devilporn 01-20-2005 09:23 AM

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?

StuartD 01-20-2005 09:26 AM

http://developer.irt.org/script/748.htm

Devilporn 01-20-2005 09:27 AM

thank you very much :thumbsup

StuartD 01-20-2005 09:29 AM

My pleasure :winkwink:

Devilporn 01-20-2005 09:41 AM

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

Devilporn 01-20-2005 09:58 AM

Nobody can tell?

StuartD 01-20-2005 10:03 AM

Ah, then change this

Code:

window.location.href = object.options[object.selectedIndex].value;
to this

Code:

window.open(object.options[object.selectedIndex].value);

Furious_Female 01-20-2005 10:04 AM

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!)

Gruntled 01-20-2005 10:05 AM

Got you covered.

Click Here!

:thumbsup

Furious_Female 01-20-2005 10:07 AM

ugh... that whole script I posted is filtered... *SiGH*

Furious_Female 01-20-2005 10:12 AM

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