Your explanation is quite clear, but you do not seem to be
totally clear in your understanding of what is happening
on the client (browser) and what is happenning on the server.
Your cgi script runs on the server and so that cannot open new browser windows - the server cannot access the client machine except to respond to requests FROM the client.
Also, the server cannot POST or GET data to the client, it is the other way round. Again, the server sends data to
the client as a response to a request.
What you will need to do to open a new browser window is to get the browser to do that - the best option here is JavaScript. That new window then requests the database results by requesting the cgi script from the server - this is also in JavaScript.
This will appear to operate in the way you describe, just what actually happens underneath is in a different order.
--
iakobski | [reply] |
If I read your question correctly, I believe I am doing something similar in that you want to call a CGI script and have the results posted into a new window.
This can be achieved by adding the TARGET="_new" to the hyperlink on the calling page something like this
<A HREF="/cgi-bin/dbcall.pl?title=XLQ20&burden=2" TARGET="_new">Fetch
+text</A>
| [reply] [d/l] |
I thought about this solution, but I dont want to use GET method to pass parameters to script.....
| [reply] |
i'm not quite sure i understand your question correctly, but
if you want to submit the form via post and have the results
in some other browser window, use this:
<form action="script.pl" method="post" target="somewhere">
...
</form>
btw: this question is not perl related,
asking in some html related newsgroup might
be more appropriate.
snowcrash ////// | [reply] [d/l] |
I think that what you are trying to achieve is;
- the user clicks on a link
- a page appears
- some hard code is ran on the server with db so it might take time,
- when it's done, a new window pops up, and the data is printed to it.
well, you can't... efficiently...
you have to tinker with stuff that has to do with the browser and you might end up with unsatisfied users leaving, because their browser does not support the way you are telling him to work.
to understand what I'm trying to say, consider this solution that doesn't always work:
- a framed site, with a dummy frame that has a size of 0
- lots of javascript to communicate between the frames.
- data is submitted to the top dummy frame
- which returns code as javascript that points the main frame to a new location and then pops up a new window when it is all done.
not efficient. doesn't always work, and annoys the hell out of the users...
so you might wanna check what the others has suggested by posting data into a new window.. more reliable, and more to the point
and maybe again, I'm not understanding your question...
He who asks will be a fool for five minutes, but he who doesn't ask will remain a fool for life.
Chady | http://chady.net/
| [reply] |