File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes HTML, CSS and JavaScript and the fly likes question about textbox 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 "question about textbox " Watch "question about textbox " New topic

question about textbox

zheng yu

Joined: Apr 25, 2001
Posts: 28
I have a text box in browser . Its Html code is like :
<INPUT type="text" name="textfield" size="80" MaxLength="40">
because the only input device is touch panel , so i create some keypads( Like japanese , english , chinese etc. )to simulate keyboard input .Javascript code is like
function keypress(txt) {
document.form1.textfield.value += txt ;
i have 2 question :
1 when i use keyboard , the text in that text field is autoscroll( you always can see what you input ) . But when i use my keypad , when text length exceed text box length , it doesnt scroll( without those arrow key or home/end ,you can not see the end of text ) . why and how can i make it autoscroll
2 Because i have set this text box's max length . when i use my keypad , it seems this max length does not take effect . Should i add some length control logic in my javascript function ?
Thanks in advance
Don't get me started about those stupid light bulbs.
subject: question about textbox
It's not a secret anymore!