Greenguy's Board


Go Back   Greenguy's Board > Programming & Scripting
Register FAQ Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 2004-12-03, 09:55 AM   #1
MrNick
I'm going to the backseat of my car with the woman I love, and I won't be back for TEN MINUTES
 
MrNick's Avatar
 
Join Date: Oct 2004
Posts: 88
Need help on a script "if you know" !

it's a jup menu, I need it to open the link in a new page,
It juste whont work

can somone help me?

<form name="form1">
<select name="menu1" onChange="MM_jumpMenu('form1.menu1.value,'_blank')">
<option>bla bla your bla bla</option>
<option value="videos.html">bla bla #1</option>
<option value="videos2.html">bla bla #2</option>
<option value="videos3.html">bla bla #3</option>
</select>
<input type="button" name="Button1" value="Go" onClick="MM_jumpMenuGo('menu1','parent',1)">
</form>

thanks
__________________
Submit your Free Sites
MrNick is offline   Reply With Quote
Old 2004-12-03, 11:05 AM   #2
AcidMaX
Programming till my fingers bleed.
 
AcidMaX's Avatar
 
Join Date: Aug 2003
Location: Michigan
Posts: 876
You need to post the javascript code between the <head></head> tags so that we can show the code. It should be the MM_jumpMenuGo function at the top of the page.
AcidMaX is offline   Reply With Quote
Old 2004-12-03, 11:07 AM   #3
MrNick
I'm going to the backseat of my car with the woman I love, and I won't be back for TEN MINUTES
 
MrNick's Avatar
 
Join Date: Oct 2004
Posts: 88
oups sorry I forgot |rasta|

<script language="JavaScript" type="text/JavaScript">
<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}

function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_jumpMenuGo(selName,targ,restore){ //v3.0
var selObj = MM_findObj(selName); if (selObj) MM_jumpMenu(targ,selObj,restore);
}
//-->
</script>
__________________
Submit your Free Sites
MrNick is offline   Reply With Quote
Old 2004-12-03, 11:16 AM   #4
AcidMaX
Programming till my fingers bleed.
 
AcidMaX's Avatar
 
Join Date: Aug 2003
Location: Michigan
Posts: 876
Well if you look at the function MM_jumpMenu. It has

targ,selObj,restore

So try

<select name="menu1" onChange="MM_jumpMenu('_blank','form1.menu1.value,'_blank')">

See if that works.

Andy
AcidMaX is offline   Reply With Quote
Old 2004-12-03, 11:36 AM   #5
MrNick
I'm going to the backseat of my car with the woman I love, and I won't be back for TEN MINUTES
 
MrNick's Avatar
 
Join Date: Oct 2004
Posts: 88
nop
open in the same window

I try everyting, and it just wont work |pissed|
__________________
Submit your Free Sites
MrNick is offline   Reply With Quote
Old 2004-12-04, 10:37 PM   #6
dgraf
If something goes wrong at the plant, blame the guy who can't speak English
 
Join Date: Jul 2004
Posts: 30
Try rip all the JS code out and add the target element like this --

Code:
<form name="form1" target="_blank">
dgraf is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 12:46 PM.


Mark Read
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc