| Author |
issue with a textbox on firefox.
|
kamlendra kumar
Greenhorn
Joined: Nov 09, 2009
Posts: 23
|
|
hi all,
i have a textbox on my page.i wanted to put restriction on max. number of charactors(100) in textbox so i created a javascript function and called it on the event "onkeypress".
the problem is
when textbox reaches to 100 charactor,it gets locked for the user,i mean it doesn't lets user delete the content,backspace also doesn't work.
can anyone help me.
with IE7 it doesn't gets locked.
thanks
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56180
|
|
|
"kami the killer", please check your private messages for an important administrative matter.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56180
|
|
|
Why not just use the maxLength attribute?
|
 |
kamlendra kumar
Greenhorn
Joined: Nov 09, 2009
Posts: 23
|
|
thanks buddy.
but the masLength attribute is present with TextBox,not with TextArea.
so i 'll have to fix that problem using javascript only.
the problem still persist.
|
 |
Kartik Talasu
Ranch Hand
Joined: Aug 21, 2009
Posts: 98
|
|
In your very first post you told that you needed for Textbox and now you are asking for TextArea.
Just clarify it whether you are using textbox or textarea.
|
 |
kamlendra kumar
Greenhorn
Joined: Nov 09, 2009
Posts: 23
|
|
oh sorry buddy.
i'm using TextArea.
now can you help me please.....
|
 |
Kartik Talasu
Ranch Hand
Joined: Aug 21, 2009
Posts: 98
|
|
Here is the code , in this code if you give more than 10 characters it will just erase them automatically.
|
 |
kamlendra kumar
Greenhorn
Joined: Nov 09, 2009
Posts: 23
|
|
|
Thanks alot.
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56180
|
|
|
"kami the killer", please check your private messages for an important administrative matter. Again.
|
 |
 |
|
|
subject: issue with a textbox on firefox.
|
|
|