How do I check RadInputManager valid on client side only?

2 posts, 1 answers
  1. Eran
    Eran avatar
    1 posts
    Member since:
    Feb 2013

    Posted 14 Aug 2013 Link to this post

    Hi there ,
    I have a page with client side code only.
    On a button click (using javascript) I want to check if inputs are valid , and if so , execute the javascript (in my case , changing tab on form)
    How can I do it?

    <asp:TextBox ID="tbFirstName" runat="server" Font-Size="1em" style="width: 150px;" ></asp:TextBox>
    <telerik:RadInputManager ID="RadInputManager1" runat="server" Skin="Office2007" >
         <telerik:TextBoxSetting BehaviorID="TextBoxBehavior1" EmptyMessage=""  Validation-IsRequired="true" >
                 <telerik:TargetInput ControlID="tbFirstName" />
             <ClientEvents OnValidating="onValidating" />

    And this is the javascript I want to run in case the input is valid (while clicking on button)

    function GeneralContinue() {
        tabStrip = $find('RadTabStrip1');
  2. Answer
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 16 Aug 2013 Link to this post

    Hi Eran,

    Please try the following code snippet that I have tried for checking RadInputManager validation in Client Side.

    <asp:TextBox ID="tbFirstName" runat="server" Font-Size="1em" Style="width: 150px;"></asp:TextBox>
    <telerik:RadInputManager ID="RadInputManager1" runat="server" Skin="Office2007">
        <telerik:TextBoxSetting BehaviorID="TextBoxBehavior1" EmptyMessage="" Validation-IsRequired="true">
                <telerik:TargetInput ControlID="tbFirstName" />
            <ClientEvents OnValidating="onValidating" />
    <telerik:RadButton ID="RadButton1" runat="server" Text="Validation" OnClientClicked="OnClientClicked1">

    <script type="text/javascript">
        var isvalid = 0; //for validation setting a Global Variable.
        function onValidating(sender, args) {
            var textbox = document.getElementById("tbFirstName");
            if (textbox.value == "") { // your Condition
                //Your Code
            else {
                isvalid = 1; // if validation succeed,setting the global variable.
        function OnClientClicked1(sender, args) {
            if (isvalid == 1) { // The click event will fire only when the global variable is 1.

Back to Top