views:

197

answers:

3

how i can move mouse courser on an element when page load with jquery? thanks

+1  A: 

If you're wanting to physically move the mouse for the user, this can not be done with Javascript or any other typical web technology.

I'd say I'm sorry, but I'm not. That's one of the worst possible things you could do to a user.

Matchu
Excellent point. Good thing nobody in their right mind would make a full-Java front-end; edited to rephrase.
Matchu
Eww... haha Java RTE.... sigh.
Joseph Silvashy
Check out the Robot class in Java: http://java.sun.com/javase/6/docs/api/java/awt/Robot.html
prometheus
...why did @prometheus's comment move down? For the record, it's what I was initially responding to.
Matchu
It didn't allow me to edit my original comment -- so I deleted it and then made a new one.
prometheus
+1  A: 

Javascript isn't able to move the mouse cursor -- it would be annoying as all get out if it could do this.

Kaleb Brasee
+3  A: 

I disagree with this interaction almost religiously. If you did that to me as a user I would immediately leave your site.

JavaScript was designed this way on purpose. Imagine the internet as it is today with all the crappy sites and exploits out there, mix in the ability to control the users mouse and you have a much worse experience.

Let your users decided what they want to click on.

Joseph Silvashy
In fact, can *any* application move the mouse? Is that something apps are even allowed to do by most OSes?
Matchu
Sure, you can hijack the user input on OSX if you want. I think its a miserable idea. Remember Windows had a functionality that would automatically move your mouse cursor to the any dialogs box "ok" button... what a bad idea.
Joseph Silvashy
Here check this out! http://www.microsoft.com/windowsxp/using/accessibility/snapto.mspx
Joseph Silvashy
Then again, you could use it in a humorous way. The first program I ever wrote was a bastardized version of pong which would move your paddles the wrong way --just-- as you were about to hit the ball. I loved watching my instructor try to play that. The game would start normally and randomly do this, so it was very deceiving.
prometheus

related questions