|
-
Jan 6th, 2009, 01:31 PM
#1
Thread Starter
Addicted Member
[RESOLVED] [2005] Required Field Validators
On my .aspx page, I have several required fields. When someone tries to submit the form without filling in a required field, that particular field is highlighted. Simple.
But what about after the user has entered a value? The box remains highlighted. I tried using some javascript to return the border color of the textbox back to normal, but I have no idea to make it look exactly as it did before it was highlighted. It's just the default border color, which appears to be a very thin light grey line around the text box, but I don't know the javascript bordercolor/borderwidth attributes needed to make it return to normal.
So, first and foremost, how do I get a field un-highlighted once the user inputs a value?
If my post helped you, please rate it!
Languages: VB/ASP.NET 2005, C# 2008,VB6
Databases: Oracle (knowledge not currently in use), DB2
FROM Customers
WHERE We_Know_What_We_Want <> DB.Null
SELECT *
0 rows returned
-
Jan 6th, 2009, 02:52 PM
#2
Re: [2005] Required Field Validators
How are you making the textbox highlighted in the first place? What is your RFV setup?
-
Jan 6th, 2009, 03:47 PM
#3
Thread Starter
Addicted Member
Re: [2005] Required Field Validators
Mendhak,
The rfv is setup with a forecolor of red.
Upon further inspection, the rfv may not be it after all. Are there any known issues with the validatorcalloutextender? I think that's the control that's actually highlighting the textbox, and the highlight color is being set via css.
If my post helped you, please rate it!
Languages: VB/ASP.NET 2005, C# 2008,VB6
Databases: Oracle (knowledge not currently in use), DB2
FROM Customers
WHERE We_Know_What_We_Want <> DB.Null
SELECT *
0 rows returned
-
Jan 6th, 2009, 04:44 PM
#4
Re: [2005] Required Field Validators
The ValidatorCalloutExtender does apply a 'highlight' to the textbox. Do you have a HighlightCssClass attribute set for the validator set?
-
Jan 6th, 2009, 05:52 PM
#5
Thread Starter
Addicted Member
Re: [2005] Required Field Validators
Is this what you mean?
highlightcssclass="validatorCalloutHighlight"
The thing that's throwing me for a loop is, the first name textbox loses it's highlight after a user enters a value, but all other textboxes remain highlighted in red.
If my post helped you, please rate it!
Languages: VB/ASP.NET 2005, C# 2008,VB6
Databases: Oracle (knowledge not currently in use), DB2
FROM Customers
WHERE We_Know_What_We_Want <> DB.Null
SELECT *
0 rows returned
-
Jan 7th, 2009, 06:11 AM
#6
Re: [2005] Required Field Validators
Yeah, that is what's causing the highlight. If you're looking to not highlight the textboxes, you can simply remove it.
-
Jan 7th, 2009, 10:00 AM
#7
Thread Starter
Addicted Member
Re: [2005] Required Field Validators
Mendhak,
Man, you will never guess what the problem was.
highlightcssclass="validatorCalloutHighlight " See that space between the last letter and the quotation mark? That was the problem. Only the validatorcallouthighlight for the txtFirstName text box has it without the space at the end.
That's one thing I always hated about programming. It's the little things that take all your time, only to figure out it was something simple.
So this is resolved, but I appreciate all your help Mendhak.
If my post helped you, please rate it!
Languages: VB/ASP.NET 2005, C# 2008,VB6
Databases: Oracle (knowledge not currently in use), DB2
FROM Customers
WHERE We_Know_What_We_Want <> DB.Null
SELECT *
0 rows returned
-
Jan 7th, 2009, 02:02 PM
#8
Re: [2005] Required Field Validators
Wow, I wouldn't have even guessed that myself. So nice work.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|