Click to See Complete Forum and Search --> : javascript problem


darkeye78
11-05-2003, 04:33 AM
hi,

i have some javascript on my website, but it doesn't works:

header:
<script type=text/javascript>
function MM_jumpMenu(targ,selObj,restore){
meinFenster = window.open(targ,"meinFenster", "width=500,height=500,left=50,top=50, hotkeys=no, location=yes, menubar=no, resizable=yes, status=yes, toolbar=no, scrollbars=yes");
}
//-->
</script>


and in the body:
<select name="menu1" onChange="MM_jumpMenu('parent',this,0)">
<option value="start.htm" selected>start</option>
<option value="go.htm">go</option>
<option value="new.htm">new</option>

</select>


if i select 'go', my internet explorer doesn't open 'go.htm'. who knows the problem?

greetz
dan

clairec666
11-05-2003, 04:47 AM
I'm not entirely sure and I'm probably worng, but............

I think part of the window.open() bit is wrong, you need to put "target=..." at the start instead of just the name of the target

Try taking out the 'targ' argument, and see if it works.

If not, I'm also not sure about the reference with 'this'
I'll just go and look it up, then I'll be back to you

clairec666
11-05-2003, 04:51 AM
Nope, scrap all that stuff that I wrote above! (sorry :rolleyes: )

You can't specify 'parent' as a target, because you are already telling it to open in a new window.

So........... take out the 'target' part and it should open your document in a new window.

clairec666
11-05-2003, 04:59 AM
Nope, scrap all that as well! :mad:
God, I'm useless! I tried out your code with my alterations and now it doesn't work at all!
Sorry
Anyone else out there to help?

darkeye78
11-05-2003, 05:02 AM
hehehe :) it doesn't works...

but thank you very much for your answer.

clairec666
11-05-2003, 06:35 AM
Sorry!
:D
God I'm useless!
Perhaps I'll stop trying to help people since I always end up confusing them!

fredmv
11-05-2003, 07:38 AM
<select name="menu1" onChange="MM_jumpMenu(this.options[this.selectedIndex].value,this,0)">

clairec666
11-05-2003, 07:40 AM
Yeah, I was going to suggest that next!
;)
Seriously, I was but I couldn't remember the exact code................

darkeye78
11-05-2003, 07:42 AM
thank you very much :)

fredmv
11-05-2003, 07:45 AM
No problem. :cool: