Advanced Search

Results 1 to 2 of 2

Thread: Simulate mouse click?

  1. #1
    Join Date
    Nov 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy Simulate mouse click?

    I really need help. I've been looking on the internet for hours trying to find a way to simulate a mouse click at a certain X,Y point on the webpage. Please if there's a way please show me. I'm extremely tired of searching all around the internet.

    Thanks!
    -evank3

  2. #2
    Join Date
    May 2007
    Location
    USA
    Posts
    373
    Thanks
    2
    Thanked 4 Times in 4 Posts

    Default

    http://developer.mozilla.org/en/docs....dispatchEvent

    I don't know if it works in IE. There probably is a version for it, but if there is, I'm not sure what it is. In any case you could always manually call the event handling functions yourself. The only issue would be that this could be a little cumbersome if there are many functions. An example of what I mean:
    Code:
    function clickHandler1(e) {/*do something*/}
     . . .
    clickHandler1({
        pageX: 100,
        pageY: 50,
        target: document.getElementById("theTarget")
        // All other necessary event attributes go here as well
    });
    Trinithis

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •