1

The question might look silly, but I want to control the mouse pointer inside my web application / webpage. One of my client asked me this requirement of Having the mouse pointer over the submit button automatically, which will save some time in his opinion.

I have suggested to press Enter key. But still he is not convinced.

So, is there any possibility that i could control the mouse pointer location, at-least inside the browser?

I have tried something with mousemove() function, which only helped me to find when i move the mouse pointer.

$(document).mousemove(function(){ //capture mouse movement event
  alert('Mouse Pointer Moved');
 $("#pageLayover").remove(); // remove our layover from the DOM
  });

Looking forward for the best solution.

General Grievance
  • 4,555
  • 31
  • 31
  • 45
J Ramesh Fernandez
  • 309
  • 1
  • 8
  • 22
  • you cant change users cursor position. you can use javascript to *simulate* this though. (it's a terrible idea- tell your client it's not possible to do) – jeremy Aug 09 '16 at 03:54
  • May be i don't want to change the cursor position. but when the page loads, the mouse pointer has to be on the specific location **(over the submit button)** – J Ramesh Fernandez Aug 09 '16 at 03:57
  • ok...: > 'you can't change users cursor position. you can use javascript to simulate this though' – jeremy Aug 09 '16 at 03:59
  • 1
    Possible duplicate of [Move the mouse pointer to a specific position?](http://stackoverflow.com/questions/4752501/move-the-mouse-pointer-to-a-specific-position) – jeremy Aug 09 '16 at 04:05

1 Answers1

0

It's impossible to control mouse position with Javascript. Here is a mozilla thread discussing why

Tony Vincent
  • 13,354
  • 7
  • 49
  • 68