tool and RequiredFieldValidator

2 posts, 0 answers
  1. Stuart
    Stuart avatar
    10 posts
    Member since:
    Nov 2007

    Posted 28 May 2008 Link to this post

    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
  2. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 29 May 2008 Link to this post

    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
Back to Top