I need to spawn another browser window using Perl. I know how to return html to the current browser window I just need to be able to send it to a fresh browser session. Does anyone know how or if this can be done?
I think what you have to do is open the new window from the one which calls your program, and target your link or form to that new window. Use the window.open javascript command to open the window (be sure to give it a name), and use the target="windowname" in the href or form tag that calls your perl script.
Tracy Dryden
tracy@bydisn.com
I was thinking along those lines before but had issues with having to pass all the data to the new window. However your reply got me thinking again. So my web form will call the perl script as normal which creates a pdf. And the window that spawns will link back to the completed pdf in this case. Thanks.
One thing you could do is dynamically create the file that you're going to call to include all of the variables in it. You can do it using Javascript. Below is an example that I used to link to Expedia.com's driving directions site. If you'd like the full page, let me know and I can post it, but here's the Javascript portion of it.
<SCRIPT LANGUAGE="Javascript">
<!--
function submitme()
{
var astr=document.findus.street.value.split(" "
var str=astr.join("+"
var acity=document.findus.city.value.split(" "
var cty=acity.join("+"
The real issue with passing data is that I'm using a Jetform form that has its own submitting process that creates a text file with all the fields on the form then calls the specified cgi. Using the method I mentioned in the last post I thought would work but the form appears to require a return value from the cgi and since in this case I don't want to return anything I keep getting errors even though the script completes successfully. I've tried just returning "" but it looks like it wants an actual document as in:
So the question is is there anyway to return something that simply keeps the browser in its current state because I do not want to loose any of my fields ?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.