Home     |     .Net Programming    |     cSharp Home    |     Sql Server Home    |     Javascript / Client Side Development     |     Ajax Programming

Ruby on Rails Development     |     Perl Programming     |     C Programming Language     |     C++ Programming     |     IT Jobs

Python Programming Language     |     Laptop Suggestions?    |     TCL Scripting     |     Fortran Programming     |     Scheme Programming Language


 
 
Cervo Technologies
The Right Source to Outsource

MS Dynamics CRM 3.0

Asp.Net Programming

client side validation order; making it fail fast.


Basically a javascript confirm in a CustomValidator based on some
business logic.

I have a textbox which needs a valid float, so I give it a
RequiredFieldValidator and a CompareValidator with a datatype check.
The text box also checks some business rules thereafter, and throws up
a javascript confirm.

If I put 14a in the box, I don't see the confirm dialog
If I erase the contents it checks the ReqField and then throws up the
javascript confirm dialog.

Its displaying the ReqField text before I see the javascript alert, so
I know its firing.

I've tried checking the args to see if they are already set to false,
they come preset to true.  Which I find odd, because if I manually set
them to true it ignores my other validation.  That's neither here nor
there though.

Is there a way to check if my other validators have already returned
false?  I really hate the javascript nag to begin with, especially if
I already know that its moot.

found it myself.

if (!Page_IsValid) { alert('not valid to begin with'); return; }

unfortunate how difficult certain things are to google.

Add to del.icio.us | Digg this | Stumble it | Powered by Megasolutions Inc