Radtextbox client events not working

2 posts, 0 answers
  1. Kishor
    Kishor avatar
    82 posts
    Member since:
    Oct 2012

    Posted 02 Jul 2013 Link to this post


     
    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>  


     
     
  2. Eyup
    Admin
    Eyup avatar
    3005 posts

    Posted 05 Jul 2013 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top