Event that fires when form submission is stopped

A

adawson

Hi,

I need to execute some code when form submission is stopped before the
page is returned from the server. For example, a user clicks a button
to submit the form, realizes they've made a mistake and then clicks the
browser's stop button so they can make a change before submitting the
form. I need to trap the click on the stop button. I'm using IE 5.0.
Thanks.
 
G

Grant Wagner

Hi,

I need to execute some code when form submission is stopped before the
page is returned from the server. For example, a user clicks a button
to submit the form, realizes they've made a mistake and then clicks
the
browser's stop button so they can make a change before submitting the
form. I need to trap the click on the stop button. I'm using IE 5.0.
Thanks.

Can't be done. Once the submit button is clicked and the browser begins
to submit the form, the existing page is torn down, including any script
on the page.

Clicking stop is undetectable at this point, because there is no
client-side script executing to trap the event, even if it could be
trapped, which it can't.
 
D

Dietmar Meier

Grant said:
Can't be done. Once the submit button is clicked and the browser
begins to submit the form, the existing page is torn down, including
any script on the page.

Just tested this in MSIE6, and found that if the user clicks the stop
button after the form is submitted, but before any data comes back from
the server, a (MSIE proprietary) stop event is indeed fired on the
document containing the form. So your statement seems to be at least
for one browser not always correct.

ciao, dhgm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,434
Messages
2,571,691
Members
48,796
Latest member
Greg L.

Latest Threads

Top