• Resolved klaybc

    (@klaybc)


    I want to use this to bring up a popover (after a user has clicked on a button on my page) that gives the user instructions on what they need to do on the next page (that they intended to go to with their initial click).

    Therefore, I am looking for a way to launch a new page (URL) when the user clicks the Close button on the popover.

    I am fine with hardwiring this into the code, as there is only one destination URL for this use case.

    I have tried editing the block.js file to add an ‘onclick’ to the <button declaration. Ex:

    <button onclick="window.location.href='https://cloud.clir.io/subscription';" type="button" style={classStyles} className="type_btn bod-btn">

    But, that does not seem to work (I have added this to all 6 <button declarations i that file). When I “inspect” the Close button element, my onclick is not there.

    Is there somewhere else I should add/change this?

    Thanks.

Viewing 1 replies (of 1 total)
  • Plugin Author merbmerb

    (@merbmerb)

    Instead of messing with the modal.js you could just create your own button by inserting a code block inside the modal. There are several ways to do this but one way is:

    <form action="https://google.com">
        <input type="submit" value="Go to Google" />
    </form>

    The advantage of this is that it will not be reset with new releases.

Viewing 1 replies (of 1 total)
  • The topic ‘Go to new page (URL) on Close’ is closed to new replies.