Page 1 of 1

Action triggering Javascript function on webpage?

Posted: 21 Aug 2016 08:27
by FhemPiUser
Hi all,

I'd like to have an action to jump to another DOM element on my webpage that is already open in the browser without reloading the webpage. Is this somehow possible?

It would also be possible to define a javascript function for that on my webpage. Is it possible to trigger a javascript function of a webpage in a browser using an automagic action?

Re: Action triggering Javascript function on webpage?

Posted: 21 Aug 2016 13:55
by Martin
Hi,

You can probably achieve this with a Bookmarklet respectively by calling a javascript function directly from the address bar:
https://en.wikipedia.org/wiki/Bookmarklet

You can try to use action Control UI to enter the text into the address bar.

Regards,
Martin

Re: Action triggering Javascript function on webpage?

Posted: 22 Aug 2016 19:38
by FhemPiUser
wow, control ui seems to be a powerful action, it should do the job. i could trigger a click x,y to click an internal link (#...) to get to another location of the webpage.

what is the id in clickbyid ? is it the dom element id of an html page?

Re: Action triggering Javascript function on webpage?

Posted: 26 Aug 2016 19:42
by Martin
You can use Show Overlay Control to show an info button at the top of the screen. Open the web page in question and press the info-button to see the control elements highlighted with a green border. You can click the highlighted elements to get a few example functions like click(x, y). It will also show a function clickById(..) if it's supported on this element.

Regards,
Martin