aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes issue with a textbox on firefox. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "issue with a textbox on firefox." Watch "issue with a textbox on firefox." New topic
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: 61612
    
  67

"kami the killer", please check your private messages for an important administrative matter.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61612
    
  67

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: 61612
    
  67

"kami the killer", please check your private messages for an important administrative matter. Again.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: issue with a textbox on firefox.