Reply
Old July 15th, 2004 Top | #1
 
onimkron's Avatar
OSNN Senior Addict
Joined: January 2004
Posts: 414
Reputation: 160
Power: 104

Question Drop-Down box query

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
onimkron is offline   Reply With Quote
Old July 15th, 2004 Top | #2
 
j79zlr's Avatar
Glaanies script monkey
Joined: February 2003
Location: Chicago
Posts: 2,725
Reputation: 1520
Power: 152

Default

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
j79zlr is offline   Reply With Quote
Old July 15th, 2004 Top | #3
 
onimkron's Avatar
OSNN Senior Addict
Joined: January 2004
Posts: 414
Reputation: 160
Power: 104

Default

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
onimkron is offline   Reply With Quote

Reply

Bookmarks

Thread Tools

Posting Rules

Similar Threads
Thread Thread Starter Forum Replies Last Post
Networking query Scooter Macintosh 8 July 12th, 2004 8:34pm
XP Writer query Funkyb General Hardware 5 June 11th, 2004 10:17am
XP SP1 WPA Query Powerchordpunk Windows Desktop Systems 2 September 1st, 2002 9:27pm
XP Activation Query Powerchordpunk Windows Desktop Systems 4 August 23rd, 2002 11:56am
NTFS Query fredur Windows Desktop Systems 4 February 14th, 2002 5:10am