Results 1 to 8 of 8

Thread: [RESOLVED] [2005] Required Field Validators

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Dec 2006
    Location
    Between Try & Catch
    Posts
    249

    Resolved [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

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: [2005] Required Field Validators

    How are you making the textbox highlighted in the first place? What is your RFV setup?

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Dec 2006
    Location
    Between Try & Catch
    Posts
    249

    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

  4. #4
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    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?

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Dec 2006
    Location
    Between Try & Catch
    Posts
    249

    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

  6. #6
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    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.

  7. #7

    Thread Starter
    Addicted Member
    Join Date
    Dec 2006
    Location
    Between Try & Catch
    Posts
    249

    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

  8. #8
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    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
  •  



Click Here to Expand Forum to Full Width