• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Drop-Down box query


OSNN Senior Addict
Just wondering if anyone can help me out on this...

<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>
<input TYPE="button" VALUE="GO!" onClick="jump(this.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:


Glaanies script monkey
Political User
I would change a bit:

<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>
<input type="button" name="go" value="Go!" onclick="window.open(url, '', 'width=350,height=400,toolbars=no,status=no,scrollbars=yes,resizable=yes')"> 
var url = document.menu1.links.options[document.menu1.links.selectedIndex].value;
Obviously you can change the window attributes to your liking, width=350,height=400,toolbars=no,status=no,scrollbars=yes,resizable=yes


OSNN Senior Addict
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 posts

Latest profile posts

Hello, is there anybody in there? Just nod if you can hear me ...
What a long strange trip it's been. =)

Forum statistics

Latest member