Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > using RegisterOnSubmitStatement prevent submit button handler firing

Reply
Thread Tools

using RegisterOnSubmitStatement prevent submit button handler firing

 
 
APA
Guest
Posts: n/a
 
      04-12-2007
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?
 
Reply With Quote
 
 
 
 
Kevin Spencer
Guest
Posts: n/a
 
      04-12-2007
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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?



 
Reply With Quote
 
 
 
 
APA
Guest
Posts: n/a
 
      04-12-2007
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.
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Loading/splash screen / RegisterOnSubmitStatement Brian Christensen ASP .Net 2 03-01-2010 03:24 AM
When using RegisterOnSubmitStatement eventhandlers are not fired APA ASP .Net 1 02-23-2007 01:22 PM
How to submit a from using JavaScript [without using submit button]? jatrojoomla Javascript 1 08-24-2006 04:46 AM
RegisterOnSubmitStatement appear twice =?Utf-8?B?YW5hdA==?= ASP .Net 1 02-05-2006 02:38 PM
Page.RegisterOnSubmitStatement problem Gandalf ASP .Net 0 07-26-2003 12:17 PM



Advertisments