|
|
Q575 How can I force Internet Explorer to open up and return the output of a cgi to a popup window using the onUnload() event handler?
irt.org | Knowledge Base | JavaScript | Window | Q575 [ previous next ] Q575 How can I force Internet Explorer to open up and return the output of a cgi to a popup window using the onUnload() event handler?This question was asked and eventually answered by Pierre Adriaans: I have an onUnload handler place on a page. When the user leaves the page, I need to pop a new window with the URL of a counter CGI that will, in turn, return a 302 with where to go. This works great in netscape, but in Internet Explorer, 25% of the time the new window opens, but does not actually call the CGI. It simply displays in the location box the call it should be making, but that's it. If I press on "refresh", the call is made, the 302 is sent, and the browser goes where it's got to go, but this "I aint calling" thing is bugging me.
So, basically, a new window will pop up, and display "http://209.118.25.167/cgi-bin/eventcounter.dll?babylon-x=redirect" in the location box, and that's it.
So, in effect, I open a window and create a document that contains one single form emulating the "GET" in a "POST", then I force the submit. I havent had a failed load since then. The actual code I use has a test that still uses the old "GET" method if you're using Netscape, of course. Though this might work also:
|
-- div -->
|