I would like to have the cgi sections (add/modify/search/subscribe) open in new windows, with certain properties(width, height, no toolbar, etc) but I don't know the JS for doing this
Sep 8, 2000, 4:23 PM
Veteran (19537 posts)
Sep 8, 2000, 4:23 PM
Post #2 of 7
Views: 1404
All that is needed is html!
If you use templates, add the following to your cgi menu links:
TARGET="_NEW" Width="?" Height="?"
eg. <a href="/cgi-bin/add.cgi" TARGET="_NEW" Width="500" Height="400">
From Paul Wilson.
http://www.audio-grabber.com
Music Directory
If you use templates, add the following to your cgi menu links:
TARGET="_NEW" Width="?" Height="?"
eg. <a href="/cgi-bin/add.cgi" TARGET="_NEW" Width="500" Height="400">
From Paul Wilson.
http://www.audio-grabber.com
Music Directory
Sep 8, 2000, 5:38 PM
User (370 posts)
Sep 8, 2000, 5:38 PM
Post #5 of 7
Views: 1393
While there's several ways to do it, here's one: Place this code in between <head> and </head>:
<script LANGUAGE="JavaScript">
< !-- hide it from old browsers
function AddWindow()
{NewWindow = window.open("/add.cgi",
"TheWindow",
"toolbar=no,width=500,height=350,directories=no,status=no,scrollbars=no,resize=no,menubar=no")}
// -->
</script>
..then for the link, just use a href="javascript:AddWindow()" and change the properties as you like. Also, close the space between < and ! above, because the code wasn't showing on this board unless you space it. BTW- If you searched the forum, you would have probably found a ton of stuff on this, plus there's alot of sites that offer tutorials on javascript.
<script LANGUAGE="JavaScript">
< !-- hide it from old browsers
function AddWindow()
{NewWindow = window.open("/add.cgi",
"TheWindow",
"toolbar=no,width=500,height=350,directories=no,status=no,scrollbars=no,resize=no,menubar=no")}
// -->
</script>
..then for the link, just use a href="javascript:AddWindow()" and change the properties as you like. Also, close the space between < and ! above, because the code wasn't showing on this board unless you space it. BTW- If you searched the forum, you would have probably found a ton of stuff on this, plus there's alot of sites that offer tutorials on javascript.