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

OnValueChanged and more then one handler

1 Answer 51 Views
Input
This is a migrated thread and some comments may be shown as answers.
Anatoly
Top achievements
Rank 1
Anatoly asked on 28 Jul 2008, 12:42 PM
Hi,
How to add more then one handler to OnValueChanged client event?

1 Answer, 1 is accepted

Sort by
0
Missing User
answered on 29 Jul 2008, 10:20 AM
Hi Anatoliy,

You can use the add_[event] method to add an event handler to the element that exposes the event. The eventName parameter should not include the "on" prefix. For example, specify "valueChanged" instead of "onValueChanged".


Here is an example:

        <div> 
            <script type="text/jscript"
            function pageLoad(sender, args) 
            { 
                $find("RadTextBox1").add_valueChanged(handler_1); 
                $find("RadTextBox1").add_valueChanged(handler_2); 
            } 
             
            function handler_1(sender, args) 
            { 
                alert("handler_1"); 
            } 
             
            function handler_2(sender, args) 
            { 
                alert("handler_2"); 
            } 
            </script>         
            <telerik:RadTextBox ID="RadTextBox1" runat="server"
            </telerik:RadTextBox> 
        </div> 



Regards,
Plamen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Input
Asked by
Anatoly
Top achievements
Rank 1
Answers by
Missing User
Share this question
or