Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Javascript (http://www.velocityreviews.com/forums/f68-javascript.html)
-   -   multiple form submits happening on window close (http://www.velocityreviews.com/forums/t872176-multiple-form-submits-happening-on-window-close.html)

Kuntal Joisher 09-06-2003 03:05 AM

multiple form submits happening on window close
 
Hi all,

Initially I have a page with a button. When the user clicks the button
a pop up window is opened up.

the main content is in this popup window. The popup window consists of
a bodyframe and a tracking frame. The tracking frame consists of a
hidden form. Also in the <body> of tracking frames HTML page I have
onunload='somemethod()'.

This somemethod() submits the hidden form on that page. I set the
response to be sent to parent.opener (i.e. the main window which
opened this popup)..

So now, when somebody clicks on the x of the popup window (i.e. closes
it) -- somemethod() function is called (since the tracker frame got
unloaded)..and the form submit happens...and the response to this form
submit is a HTTP 204 ..which is sent to the opener window..and since
it is a 204 browser does nothing..Everything works fine..

But now if someone closes the opener window(the main window)...before
closing the popup --
so now if they close the popup window, the hidden form is submitted
twice!!!!!!!!!!!...Also an additional blank window comes up which has
URL as the action of the form!!!!!!!

I am not sure what is happening out here. Could somebody please
explain???

--Kuntal.


All times are GMT. The time now is 12:01 PM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.