469,627 Members | 1,104 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,627 developers. It's quick & easy.

using RegisterOnSubmitStatement prevent submit button handler firing

APA
Why does adding code to the form submit function using the RegisterOnSubmitStatement method prevent the server side event handler for the submit
button from firing? This is completely useless. I need some custom javascript validation on form submit but why does is kill the submit button event
handler? Submit buttons don't use __doPostBack so what is being effected?
Apr 12 '07 #1
2 2607
The client script executed by the submission of the form must return true in
order to allow the form to submit. This enables the client-side script to
prevent the submission of the form conditionally.

--
HTH,

Kevin Spencer
Microsoft MVP

Printing Components, Email Components,
FTP Client Classes, Enhanced Data Controls, much more.
DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net

"APA" <bu******@hotmail.comwrote in message
news:ug**************@TK2MSFTNGP02.phx.gbl...
Why does adding code to the form submit function using the
RegisterOnSubmitStatement method prevent the server side event handler for
the submit button from firing? This is completely useless. I need some
custom javascript validation on form submit but why does is kill the
submit button event handler? Submit buttons don't use __doPostBack so
what is being effected?

Apr 12 '07 #2
APA
The problem is when it does return true. When the form does submit it doesn't fire the submit button eventhandler.

Kevin Spencer wrote:
The client script executed by the submission of the form must return true in
order to allow the form to submit. This enables the client-side script to
prevent the submission of the form conditionally.
Apr 12 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

13 posts views Thread by John Kiernan | last post: by
5 posts views Thread by Steve S | last post: by
2 posts views Thread by Stephen Miller | last post: by
reply views Thread by Chris Fink | last post: by
8 posts views Thread by Pazza | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.