Hello! I feel like such a noob here, BUT, how can I run the following javascript?
I’ve added the script to the header, but I’m unsure how to run it. I’ve installed the Toolbox plugin and found the ‘Run Javascript’ action, but I’m unsure what to do from there.
If it runs properly, a popup should appear. Thanks for any input!
Thanks, @rpetribu! I should’ve clarified that I need this to run on a button click.
Regardless, I imagine the ‘Run Javascript’ action is needed whether off a button click or page load. Do I simply paste that script into the ‘Run Javascript’ action? If so, that’s not working for me
Well that script they tell you to include in your header or footer.
You could copy that and try your luck inside of your app settings and paste it into the script/meta tags inside header or click on the page you want it on, scroll to the bottom of the settings to edit, and input it there on the page header html.
Maybe even the html element. Have you tried either of these?
Pasting it in an HTML element didn’t work. I did paste it in the header from the settings tab, but I’m just not sure how to run it. Check this example—they have ‘Book Now’ button that runs the script and opens a popup.
I guess my question is how can I run the script to open up the intended popup? I clearly have minimal JS knowledge. I really appreciate your input so far.
I know next to nothing about JS but I did get some headway with problems like this using ChatGPT. It can help you understand the script and therefore ask better questions to it or to the forum.
Take what’s seen in the first script tag which is just references, place them in your settings, then use the actual JavaScript inside of a run JavaScript action from the toolbox plug-in or whatever it is.
Like the instructions say, the script goes in your header. You fire it via other techniques as surely explained in the documentation you’re looking at (in/around/related to the screenshot you shared). Read the docs.