Hi folks,
is it possible to use coordinates in order to simulate a click? Or is this technically impossible? :O
I'm using Javascript within a webpage.
Help would be great, and also quite interesting!!! =)
Hi folks,
is it possible to use coordinates in order to simulate a click? Or is this technically impossible? :O
I'm using Javascript within a webpage.
Help would be great, and also quite interesting!!! =)
For security reasons, you can't move the mouse pointer with javascript, nor simulate a click with it.
What is it that you are trying to accomplish?
As Aircule answered, you can't simulate a "real" mouse click via JavaScript. However, you can fire an element's click event, and you can get an element using x/y co-ordinates - so you could fire a click event on the element at x/y. Since you tagged jQuery:
$(document.elementFromPoint(x, y)).click();
https://developer.mozilla.org/En/DOM:document.elementFromPoint