In my web page there is a textbox with width and height equal to 0. This textbox is used to get the scanned bar code value which should not be visible to the user.
Needs:
- I want to set focus to the textbox, when i click anywhere in the form.
- I want to make the cursor invisible.
Geetha.
As for setting focus,
will do the trick. You can add that to any click handler, such as
As for hiding the cursor, you could apply a cursor: none to the form or parent div as a style or as in the preceding example change it’s css via jquery.
The cursor:none is while the cursor is in the bounds of the element – though this behavior in it’s entirety seems obscure and unnecessary (not to mention confusing to the user).
Example
Here’s an example of using absolute positioning to both hide the input field and its cursor. It focuses the field on load, so if you type, then press the Go button, you’ll see what you typed.