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
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply 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: 56180
    
  13

"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
    
  13

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
    
  13

"kami the killer", please check your private messages for an important administrative matter. Again.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: issue with a textbox on firefox.
 
Similar Threads
Samsung device display problems - TextBox and Alert
Swing JComboBox question
JFrame locks freezes
Textbox String
Textbox value removal