Go Back   CodingForums.com > :: Client side development > JavaScript programming > Ajax and Design

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 03-30-2009, 04:12 PM   PM User | #1
Agrexias
New to the CF scene

 
Join Date: Mar 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Agrexias is an unknown quantity at this point
Post validating .net validation controls using javascript

I need to validate multiple .net validation groups(a normal group would consist of RequiredFieldValidators, RegularExpressionValidators, ValidationSummary, etc) using javascript. I am using Page_ClientValidate("GroupName") to validate the groups. The problem arises when i validate multiple groups. The validation summary and errors only appear for the last group validated or nothing appears if the last group validated returns true. I want all validation summaries and errors to appear for all groups that return a false validation. I'll never validate all groups, so I can't use Page_ClientValidate(). I have multiple tabs on a page and each tab has 1 or more validation groups assigned to it. Any ideas/solutions would be most appreciated. I've hit a wall for now.

Example of what i am doing:

var Tab1 = false;var Tab2 = false;var Tab3 = false;

Tab1 = Page_ClientValidate("Tab1");
Tab2 = Page_ClientValidate("Tab2");
Tab3 = Page_ClientValidate("Tab3");

if(Tab1 && Tab2 && Tab3)
{
__doPostBack(SaveandExit,"");
}
Agrexias is offline   Reply With Quote
Old 04-20-2009, 01:58 PM   PM User | #2
A1ien51
Senior Coder

 
A1ien51's Avatar
 
Join Date: Jun 2002
Location: Between DC and Baltimore In a Cave
Posts: 2,717
Thanks: 1
Thanked 94 Times in 88 Posts
A1ien51 will become famous soon enough
This really has nothing to do with Ajax and design and should have been posted in the .NET section of the forum.


Sounds like the validation control overrides whatever is in the output summary section. It might be easier to code your own with a custom validator if the documentation does not tell you anything else.

Eric
__________________
Tech Author [Ajax In Action, JavaScript: Visual Blueprint]
A1ien51 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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

Forum Jump


All times are GMT +1. The time now is 06:08 AM.


Advertisement
Log in to turn off these ads.