By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,608 Members | 1,925 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,608 IT Pros & Developers. It's quick & easy.

Event that fires when form submission is stopped

P: n/a
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.

Jul 23 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
<ad*****@ufcw.org> wrote in message
news:11**********************@c13g2000cwb.googlegr oups.com...
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.

--
Grant Wagner <gw*****@agricoreunited.com>
comp.lang.javascript FAQ - http://jibbering.com/faq
Jul 23 '05 #2

P: n/a
Grant Wagner wrote:
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
Jul 23 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.