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

Radtextbox client events not working

1 Answer 112 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Kishor
Top achievements
Rank 2
Kishor asked on 02 Jul 2013, 12:43 PM

 
hello 

 Radtextbox client events not working.

 on mousehover i want to increase the size of textbox
 and on onmouseout reset the size of textbox

its not working 
please help




<
script type="text/javascript">
            
                         
            function show(textField)
                {
                    textField.style.width="670px";
                    textField.style.height="400px";
                }
              
                 
                function hide(textField)
                {
                     
                    textField.style.width="670px";
                    textField.style.height="100px";
                    
                }
       
    </script>
 
 
 
 <telerik:RadTextBox  ID="txtComment"  runat="server" TextMode ="MultiLine"  Width ="670px" Font-Size ="12px"  Font-Names ="Arial" style="overflow:auto; padding :5px" Rows ="5" >
           <ClientEvents OnMouseOver ="show()" onmouseout="hide()" /
 </telerik:RadTextBox>  


 
 

1 Answer, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 05 Jul 2013, 10:11 AM
Hi Sawan,

You can use the following approach:
<telerik:RadTextBox ID="txtComment" runat="server" TextMode="MultiLine" Height="100px"
    Width="670px" Font-Size="12px" Font-Names="Arial" Style="overflow: auto; padding: 5px" Rows="5">
    <ClientEvents OnMouseOver="increaseSize" OnMouseOut="decreaseSize" />
</telerik:RadTextBox>
JavaScript:
function increaseSize(sender, args) {
    var textBoxEl = sender.get_element();
    textBoxEl.style.width = "670px";
    textBoxEl.style.height = "400px";
}
function decreaseSize(sender, args) {
    var textBoxEl = sender.get_element();
    textBoxEl.style.width = "670px";
    textBoxEl.style.height = "100px";
}

Hope this helps.

Regards,
Eyup
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Editor
Asked by
Kishor
Top achievements
Rank 2
Answers by
Eyup
Telerik team
Share this question
or