This is a migrated thread and some comments may be shown as answers.

tool and RequiredFieldValidator

1 Answer 96 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Stuart
Top achievements
Rank 1
Stuart asked on 28 May 2008, 09:44 PM
I am trying to validate a textbox on a form.  What I want to happen is, if the user leaves this textbox without entering any data,  a tool tip to show as soon as they leave the text and give a message saying this field is required.  I got the validation summary to work after a submit button is clicked but how do I show the tool tip to appear right after the focus leaves the text box.

Thanks,
Stuart

1 Answer, 1 is accepted

Sort by
0
Svetlina Anati
Telerik team
answered on 29 May 2008, 03:14 PM
Hi Stuart,

I suggest to use the RadToolTip's client side API in order to achieve the desired behavior. Basically the idea is to do the following:

  1. Hook up the submit event which should be the validating one (e.g button click)
  2. Check the visibility of the validator - if it is visible then there are validation errors
  3. If there are errors, execute a javascript function which references the RadToolTip and shows it.

You can find a working online demo which shows a very similar scenario here.  

Best wishes,
Svetlina
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
ToolTip
Asked by
Stuart
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
Share this question
or