Click to See Complete Forum and Search --> : open a cgi script in a new window using javascript


lindamoran
01-23-2005, 04:54 AM
I have this link that opens a cgi script in a new window. However, I'd like to be able to control the size of the window. Here is the link:

<h3><a href="http://www.lindamoran.net/cgi-bin/LMshowlink.cgi" target="_blank">Link to this page</a></h3> &nbsp;

In the Castro book it says you can do so with javascript. I do not know javascript at all. I can't seem to get the syntax right. I think maybe I'm not getting the target correct. Below is one example of what I've tried.

<h3><a href="javascript:location='alovingfather.html';
window.open('http://www.lindamoran.net/cgi-bin/LMshowlink.cgi', '_blank', 'height=300, width=300, scrollbars=yes, resizable=yes')">Link to this page</a></h3> &nbsp;

Would a kind person give me the right syntax? Thanks. (Or perhaps another way to do it without javascript?)


Linda Moran (http://www.lindamoran.net)

lindamoran
01-23-2005, 05:38 AM
It's sort of working, I realized, but I discovered that now my Perl script is failing because it's looking for ENV('HTTP_REFERER'). WIth the old link, it worked. But now that I'm using javascript to open the new window for the Perl script to run in, ENV('HTTP_REFERER') is blank. How can I fix this?

Linda Moran (http://www.lindamoran.net)