Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Rangevalidator - Clearing error text

Status
Not open for further replies.

olypost

Programmer
Apr 15, 2005
43
US
I have a rangevalidator on a textbox control that is firing correctly for me. I get my error text to display.

What I'd like to do is click on a 'clear field' button that will clear out all textbox entries on the page, and also the error text from the rangevalidator.

How do I clear the rangevalidator text, but still have it continue to show the text on subsequent calls?

To clear the text, I have:

document.getElementById("Mytext").innerText = "";
document.getElementById("rvMytext").innerText = "";

Running this will remove the value and text, but then if the rangevalidator fails again, I can't see the error anymore since it's erased.

It seems setting the caseID in javascript to "" doesn't fire the rangevalidator. Is there a way to do this?

Thanks.
 
When you say you are clearing all of the textboxes on the page, do you mean that you are also clearing all information that the user has inputted on the page? If so, simply add a button and use Response.Redirect to redirect them back to the same page.


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top