SitePoint Sponsor |
|
User Tag List
Results 1 to 2 of 2
Thread: Why will this not work?
-
Dec 24, 2001, 10:56 #1
- Join Date
- Jun 2001
- Location
- Oklahoma
- Posts
- 3,392
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Why will this not work?
Head:
Code:<script language="javascript" type="text/javascript"> <!-- function openwindow(file,title,width,height) { window.open(file,title,config='scrollbars=yes,resizable=no,width,height') } //--> </script>
Code:<p><form action="" method="post"> <input type="button" name="menu" value="Restaurant" onclick="openwindow(menu_1.php','Menu','width=600','height=600')" /> <form></p>
I need to be able to specify the width and height in an onclick event because there will be multiple buttons on a page and all of the new windows will need to be of various dimensions.Colin Anderson
Ambition is a poor excuse for those without
sense enough to be lazy.
-
Dec 24, 2001, 11:10 #2
- Join Date
- Feb 2000
- Location
- where the World once stood
- Posts
- 700
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Hi Aes,
window.open(file,title,config='scrollbars=yes,resizable=no,width,height')
Re the above: try killing "config=". The syntax should be:
window.open(url, title, features)
where features is a name/value pair separated by commas; there is no "config="
VinnyWhere the World Once Stood
the blades of grass
cut me still
Bookmarks