How can I run this Javascript?

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!

1 Like

Create a workflow to run “On Page Load” and add the “Run Javascript” action from Toolbox plugin.

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 :face_with_raised_eyebrow:

@keith would you mind giving me a solution—you’re more than welcome to roast me in the process :crazy_face:

Keith: ding dong, half of this script isn’t designed to be implemented within 1 action, or within an action at all.

1 Like

Lol ok thank you! Making progress…@doug.burden can you enlighten me on how to make it work. I truly am sorry to be annoying @everyone

1 Like

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?

Ya, I’ve tried both with no luck, unfortunately.

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.

1 Like

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.

1 Like

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.

Guys…

image

Good idea!

Thanks again for your input!

Woof!

I still don’t know to make it work! Please refer to OP where I mention I’m a dumb noob! :pensive:

This topic was automatically closed after 70 days. New replies are no longer allowed.