Drop-Down box query

onimkron

OSNN Senior Addict
Joined
17 Jan 2004
Messages
414
Just wondering if anyone can help me out on this...

Code:
<form action="areas" method="post">
<select name="opsmenu1" size="5">
<option value="ih01/demil/fm16/index.htm*_blank">FM16 Area</option>
<option value="ih01/demil/fm21/index.htm*_blank">FM21 Area</option>
</select>
<input TYPE="button" VALUE="GO!" onClick="jump(this.form)">
</form>

At the moment, it's fine; clicking on a link and selecting 'go' makes it load the selected html page on a different window. What I want to do is make it so that the new window is of a predefined size, possibly with "width" and "height" tags, but I've got no idea on how to do so :confused:

Any help will be appreciated

Edit: Ah wait, nevermind, I solved it through the java script code near the <head>. Please disregard this post :eek:
 
I would change a bit:

Code:
<form name="menu1" method="post" action="">
<select name="links">
<option value="ih01/demil/fm16/index.htm*_blank">FM16 Area</option>
<option value="ih01/demil/fm21/index.htm*_blank">FM21 Area</option>
</select>
<input type="button" name="go" value="Go!" onclick="window.open(url, '', 'width=350,height=400,toolbars=no,status=no,scrollbars=yes,resizable=yes')"> 
<script>
var url = document.menu1.links.options[document.menu1.links.selectedIndex].value;
</script>
</form>

Obviously you can change the window attributes to your liking, width=350,height=400,toolbars=no,status=no,scrollbars=yes,resizable=yes
 
Very nice, thanks for that. I opted to change the java script code instead, since that would allow me to use other window sizes for different links, rather than restrict it to those in the drop-down box. For example, _blank for video files, _blankpic for galleries etc, with varying window sizes on pop up.

Thanks for the code though, would've saved me a lot of time :)
 

Members online

No members online now.

Latest profile posts

Also Hi EP and people. I found this place again while looking through a oooollllllldddd backup. I have filled over 10TB and was looking at my collection of antiques. Any bids on the 500Mhz Win 95 fix?
Any of the SP crew still out there?
Xie wrote on Electronic Punk's profile.
Impressed you have kept this alive this long EP! So many sites have come and gone. :(

Just did some crude math and I apparently joined almost 18yrs ago, how is that possible???
hello peeps... is been some time since i last came here.
Electronic Punk wrote on Sazar's profile.
Rest in peace my friend, been trying to find you and finally did in the worst way imaginable.

Forum statistics

Threads
62,015
Messages
673,494
Members
5,621
Latest member
naeemsafi
Back