Click here to Skip to main content
15,920,632 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
hi all...
i have script like this:

XML
<script type="text/javascript">
        function count(txt)
       {
          var textchar='<%= TextBox2.MaxLength %>';
          var textbox=document.getElementById(txt);
          var lbl=document.getElementById('<%= Counlbl.ClientID %>');
          if(textbox.value.length>textchar)
          {
          textbox.value=textbox.value.substrung(0,textchar);
          }
          lbl.innerText=textchar-textbox.value.length+" Characters remaining..";
       }
   </script>


this script working in internet explore but not working in Mozilla Firefox and also i put max length as 120 characters it raises exception after crossing length 1.how can i prevent this exception 2.how can i make this script to work in Firefox can any one please help me
Thanks in Advance
Posted
Updated 10-Jul-11 3:45am
v2

 
Share this answer
 
You should give Ajax-Frameworks[^] a try...

[argh... not native speaker]
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900