How do I simulate a button click in a browser?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Posts: 121
- Joined: Thu Mar 27, 2008 10:19 am
How do I simulate a button click in a browser?
Hi,
I would like to simulate a mouseclick on a button that appear in a revBrowser windoid. There's a way to do it?
Thanks
I would like to simulate a mouseclick on a button that appear in a revBrowser windoid. There's a way to do it?
Thanks
Re: How do I simulate a button click in a browser?
You might be able to do it through JavaScript and the revBrowserExecuteScript function
-
- Posts: 121
- Joined: Thu Mar 27, 2008 10:19 am
Re: How do I simulate a button click in a browser?
Thank you, shaosean, I think I could use something like this: "document.getElementById('youridhere').click()".
The problem is that I must click simple href links, without ID (es: <a href="www.google.com">Google</a>).
Any suggestion?
The problem is that I must click simple href links, without ID (es: <a href="www.google.com">Google</a>).
Any suggestion?
Re: How do I simulate a button click in a browser?
Hi Paul,
can't you just:
...
revbrowserset tBrowserID, "url","www.google.com"
...
instead of really clicking?
Result should be the same
Best
Klaus
can't you just:
...
revbrowserset tBrowserID, "url","www.google.com"
...
instead of really clicking?
Result should be the same
Best
Klaus
-
- Posts: 121
- Joined: Thu Mar 27, 2008 10:19 am
Re: How do I simulate a button click in a browser?
Hi Klaus, this is exactly what I'm doing now. I will continue in this way...
Greetings
Paul
Greetings
Paul
Re: How do I simulate a button click in a browser?
This is an old thread but I just found this and know it will be useful in the future:
https://developer.mozilla.org/en-US/doc ... ing_events
Particularly the bit headed Triggering built-in events. I got it working from this directly.
All the best
Pi
https://developer.mozilla.org/en-US/doc ... ing_events
Particularly the bit headed Triggering built-in events. I got it working from this directly.
All the best
Pi
Re: How do I simulate a button click in a browser?
Interesting that this is such an old thread and yet it still gets a lot of views.
The answer from Pi does work but there is an easier way.
In the demo in the second message here http://forums.livecode.com/viewtopic.php?f=11&t=25307 you will find a working method which works reliably and I find easy to use.
My apologies for hijacking an old thread and then pointing you to my own post but my title doesn't look like it would have an answer for this question.
The answer from Pi does work but there is an easier way.
In the demo in the second message here http://forums.livecode.com/viewtopic.php?f=11&t=25307 you will find a working method which works reliably and I find easy to use.
My apologies for hijacking an old thread and then pointing you to my own post but my title doesn't look like it would have an answer for this question.