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 Text box 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 "Text box" Watch "Text box" New topic

Text box

sandhya prasanth

Joined: Jan 23, 2008
Posts: 1
I am using a text box to display a value in JSP. The text box is alligned using CSS.
I am not able to place my cursor easily Text box. The text box max length is given as 25. But the text box cursor is appearing only whne i click in the text box till letter 10 position.
pls let me know some suggestions on this.
Bryce Martin
Ranch Hand

Joined: Nov 19, 2007
Posts: 269
You need to set focus for the text box onLoad. Probably do it for the <body> .onLoad. You can only go as far in the text box as you have data. If the text box is size 25 but only has 10 letters in it, you will only be able to go to the 10th letter with the cursor. try entering the entire alphabet from a-z. You should get to 'y' before it stops putting letters in the box.
Eric Pascarello

Joined: Nov 08, 2001
Posts: 15385
You are saying you can not focus the textbox manually unless you click after the 10th character?

If that is the case, it sounds like you just found a quirk with your browser and OS. I have never heard of that before. Can you reproduce this with other machines.
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63858

pls let me know some suggestions on this.[/QB]

Please use real words when posting to the forums. Abbreviations such as "pls" in place of "please" only serve to make your posts more difficult to read and less likely to generate useful responses.

Please read this for more information.

JavaRanch sheriff

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: Text box
jQuery in Action, 3rd edition