Click to See Complete Forum and Search --> : Send mouse click event?


AndyPandy
06-16-2004, 02:54 AM
Ok, another weird question...
I want to trigger a mouse-click at a certain position.
Is it possible to from javascript trigger a mouse-lick-event?
Thanks!
/A

Kor
06-16-2004, 03:21 AM
onclick is the event handler

to capture the event on a certain position on screen, just capture the mouse poosition and fire the function with onclick="function" placed in <body>

Or, if you want document.body.onclick()

AndyPandy
06-16-2004, 03:36 AM
Maybe I was a bit blurry but I want to TRIGGER a mouse click, not CAPTURE. I want to send a mouse click from JavaScript.
I'm not sure if it is possible but it would be cool. :)

Tage
06-16-2004, 03:58 AM
I am pretty sure you cannot trigger mouse clicks or key presses.

Vladdy
06-16-2004, 06:22 AM
Why would you want to do that???

Pittimann
06-16-2004, 06:53 AM
Hi!Originally posted by Vladdy:
Why would you want to do that???I guess the answer is related to this: http://www.webdeveloper.com/forum/showthread.php?s=&threadid=37445 :p

To AndyPandy: if you want to have such a functionality inside the page your script is situated in, at least for IE, you can, but I'm sure you want to click something which doesn't belong to you...

Cheers - Pit

AndyPandy
06-16-2004, 06:57 AM
Well, my main wish is to open a new window with an URL to an e-commerce site, and automaticly fill out parts of their form.
And when it looks like I cant access the child windows form, i got a wild idea that maybe I could trigger things by "simulating mouse clicks". I don't know. Guess I'm just desperate... :)

Pittimann
06-16-2004, 07:00 AM
Hi!i got a wild idea that maybe I could trigger things by "simulating mouse clicks"I was convinced that this was what you wanted. No chance!

Do you want to spam someone?? :D

Cheers - Pit

AndyPandy
06-16-2004, 07:04 AM
Pittimann>> You're fast, and you're right! :)
As I said, I'm getting desperate...

I've got a great idea, but now I just have some techincal problems to solve... :(

AndyPandy
06-16-2004, 07:08 AM
Pittimann >> Now your wrong. Spam is not my thing.
I've got a great idea that could be applied to e-commerce sites and also betting sites. But it seems impossible now... :(

Pittimann
06-16-2004, 07:18 AM
Hi!

I did not at all want to offend or accuse you - I was just joking.
As far as your idea is concerned: you will not have access to the popup's form from your file and you will not be able to simulate a click an any control inside that popup this way.

Cheers - Pit

AndyPandy
06-16-2004, 07:25 AM
Pittimann>> No probs. Didn't get offended but surprised I haden't thought that a techniqe like that could be used for spam or other ****. But ofcourse, that must be why it's not possible. S-h-e-t!

Thanks for destroying my plans and my future income! ;)

Pittimann
06-16-2004, 07:29 AM
Hi!Thanks for destroying my plans and my future income!You're welcome! :p

I have to admit: it was not a pleasure for me to do that! :cool:

Cheers - Pit

Kor
06-16-2004, 10:07 AM
Sometimes, if don't get the solution you want, that doesn't mean that the solution is not possible... There are some, let's say, "moral" obstacles that prevent you from getting it. It's like in Martial Arts: the more methods to kill a human been you learn, the less you will use or tell it to the others...:D