Form-level onSubmit handler

G

Guest

When I invoke RegisterOnSubmitStatement, my script is inserted prior to the page validation invocation inserted by DotNet. In this case, my script needs to run only if all client-side validation is successful. It blocks multiple submits, and alters the submit button to give the user some visual feedback that the submit occurred

How can I change the order in which the scripts execute, including those inserted by DotNet

Thanks in advance for your help

Jim Brandley
 
B

bruce barker

you can't, but your script can call the validator code itself, to decide
whether to run.

-- bruce (sqlwork.com)


Snowbank Jim said:
When I invoke RegisterOnSubmitStatement, my script is inserted prior to
the page validation invocation inserted by DotNet. In this case, my script
needs to run only if all client-side validation is successful. It blocks
multiple submits, and alters the submit button to give the user some visual
feedback that the submit occurred.
 
G

Guest

I thought of that too, but the ValidatorOnSubmit function doesn't have a return value.
 
P

Peter Blum

Hi Jim,

I have a solution for you. My product, "Professional Validation And More",
was created to overcome the many limitations of Microsoft's validation
framework. In your case, it's page submit event handler supports the
following:
1. You can hook in your own javascript just by setting a property.
2. You can tell it to put up a confirmation message box that can cancel page
submission.
3. You can dictate the desired order of events between validation, confirm
message, and your script handler.

You will find that Professional Validation And More has tremendous
improvements to validation, saving you time from custom coding and hacks.
Details are at http://www.peterblum.com/vam/home.aspx.

--- Peter Blum
www.PeterBlum.com
Email: (e-mail address removed)
Creator of "Professional Validation And More" at
http://www.peterblum.com/vam/home.aspx

Snowbank Jim said:
I thought of that too, but the ValidatorOnSubmit function doesn't have a
return value.
 

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
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top