On mouse click: load or refresh html widget website

I am creating a webpage that showcases an introduction animation on another site. How could I make a button load or refresh a website within an html widget on mouse click, so that the user can see the website animation from start to finish?

example.zip (15.3 KB)

Here’s how you’d do it:

  1. Add a Unique Element ID in the Identity Inspector for the HTML Widget element (I call it "myWidget")
  2. Add an On Mouse Click action on the button to Run JavaScript… with code like:
    var iframeElement = hypeDocument.getElementById("myWidget").getElementsByTagName("iframe")[0];
    iframeElement.src = iframeElement.src;

example-fixed.hype.zip (8.9 KB)

1 Like

great, much appreciated