Forum Moderators: open
I would like a piece of javascript to trigger a click on a element (or even the whole window or document) WITH coordinates.
I know how to trigger a click with an element click() function (example: [webmasterworld.com...]
But there does not seem to be a way to send coordinates.
This is useful to simulate clicks on images, or on non html content, such as flash movies, or other plugins...
Thanks.
On IE
look up document.createEventObject() and element.fireEvent()
If i add a onclick property to the <embed> element containing the flash movie, the onclick event handler get triggered by the dispatch event.
Its like the html embed object get the event, but not the actual embeded object...
This is in Firefox 3.0, using a flash widget embedded as follows:
<embed id="bms" width="425" height="350" type="application/x-shockwave-flash" src="http://www.example.com/bms/cyprien" />
[edited by: whoisgregg at 2:11 pm (utc) on Sep. 9, 2009]
[edit reason] Exemplified Flash URL. :) [/edit]