Click to See Complete Forum and Search --> : popup window in a menu
jpbertra
12-31-2002, 09:10 AM
how can I make a popup window from a drop-down menu
where pdf.htm is the page I want to open.
<form name="form1" action="pdf.htm" target="_blank">
<select name="select">
<option selected>Choose a chapter...</option>
<option value="catalogue/10.pdf">10 - 297KB</option>
<option value="catalogue/11.pdf">11 - 524KB</option>
<option value="catalogue/12.pdf">12 - 144KB</option>
</select>
</form>
Charles
12-31-2002, 10:35 AM
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Content-Script-Type" content="text/javascript">
<title>Example</title>
<form name="form1" action="link.pl" target="child" onsubmit="window.open('', 'child', 'height=300,width=200')">
<select name="select">
<option value="catalogue/10.pdf">10 - 297KB</option>
<option value="catalogue/11.pdf">11 - 524KB</option>
<option value="catalogue/12.pdf">12 - 144KB</option>
</select>
<input type="submit" value="Choose a chapter...">
</form>
If you do not want to control the geometry of the child window then omit onsubmit="window.open('', 'child', 'height=300,width=200'). And then get something like the following up and running and named something like "link.pl". You will need to talk to your server people.
#!usr/local/bin/perl
use CGI qw(redirect param);
print redirect param select;
jpbertra
12-31-2002, 10:49 AM
thanks and have a happy new year...