B
besbello
Hi all,
I want to submit a form when the user closes the browser, to keep a
count of the number of users accesing my application at each moment. To
do this, I use the onbeforeunload() event, that calls a function when I
call form.submit() method. The problem is that I have to put an
'alert()' after this line, if I remove the 'alert()' line, things
don´t work. The submit() method seems to return before the form is
really submitted, and the browser get closed, so the form is never
really submitted. I don´t want to have this annoying 'alert()'. Does
anybody know another way to ensure submit really executes before
browser get closed?
Thanks a lot.
I want to submit a form when the user closes the browser, to keep a
count of the number of users accesing my application at each moment. To
do this, I use the onbeforeunload() event, that calls a function when I
call form.submit() method. The problem is that I have to put an
'alert()' after this line, if I remove the 'alert()' line, things
don´t work. The submit() method seems to return before the form is
really submitted, and the browser get closed, so the form is never
really submitted. I don´t want to have this annoying 'alert()'. Does
anybody know another way to ensure submit really executes before
browser get closed?
Thanks a lot.