473,324 Members | 2,501 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

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.

May 29 '07 #1
1 1077
found it myself.

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

unfortunate how difficult certain things are to google.
May 29 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Jeff | last post by:
I need to intercept the Click event of a asp:Button on the client side so that i can disable it after they've clicked it... HOW can i do this?? I was thinking of making the button an HTML button...
3
by: Gareth | last post by:
Hi, I've just published a test web site on the internet with a simple form and some client side validation controls. On my development PC if I click submit without entering any data the validation...
4
by: | last post by:
Hello Guys, I am using the validation controls to validate my data. But the problem is "The page is still being posted to server". I want to get rid of the round trips to server. Are there...
1
by: Zoe Hart | last post by:
I know that I can use a control's Attributes collection to specify client-side event handlers. I want to add a simple javascript function to pop up a confirmation message for a command button. The...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.