aspose file tools
The moose likes HTML, CSS and JavaScript and the fly likes mouse focus Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Meteor in Action this week in the JavaScript forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "mouse focus" Watch "mouse focus" New topic

mouse focus

sinasi susam
Ranch Hand

Joined: Jul 15, 2005
Posts: 67
Hello ,

I want to disable focusing by mouse to form elements.As you know clicking to any field in the page, the cursor is jumping to that field which focus gained.

I want to disable focusing by mouse.
Focusing or Bluring will be only with tab_key.

i searched internet too much But i could not find anything

Do you have any idea about how to?
[ December 23, 2005: Message edited by: sinasi susam ]
Eric Pascarello

Joined: Nov 08, 2001
Posts: 15385
you can try onclick (might get fired for more than the mouse) and remove focus. Not sure why you want to do this unless it is for a scanner input.

sinasi susam
Ranch Hand

Joined: Jul 15, 2005
Posts: 67
I want to do because its an application similar to ajax
(i am using applet and URL connection class.).

I want to do that.Ok letme explain,

Lets suppose that we have 2 text fields and i have a validation on server let 1. one must be required and that must not be empty string for the validations that will be in the 2. field.

I cant give an alert such "fill the first field and try again", this sounds stupid.What if there are about 20 fields ?
will i say "you filled this one but passed previous one ,fill that i will validate it then"

I want the user must not focus anything else Tab key
I want to force the user use only keyboard for bluring.TAB key.
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 62464

If you are worried about looking stupid, hobbling your application to only allow foucs via tabbing is a good way to achieve that. How unfriendly!

Good wording in the validation messages would be the way to go.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
sinasi susam
Ranch Hand

Joined: Jul 15, 2005
Posts: 67
Mr./Mrs. Bear, I want it to be as i said if its posible.Only what i said...

If no way to do it, then i dont need any other advices.

Thx anyway.
[ December 24, 2005: Message edited by: sinasi susam ]
I agree. Here's the link:
subject: mouse focus