The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Why the Javascript click does not work?

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #270282

    Hey Guys,

    Here is the little problem: We are using a video platform called VERSE. They provided us a “callback click” function that will be trigger a pop-up page.

    Clicking on some parts of the actual video to call this pop-up page works perfectly, but I want to call the same pop-up page by using a regular link or button on the page.

    Here is the example and follow these directions to better understand:

    1- Click on View Story
    2- Hover over the red dot and click the (Explore Areas of Interest)
    3- Click on the first or second squares

    You will get the pop-up page that has a specific ID.

    Here is the Javascript they provided us:

    (function() { window.onload = function() { var frame = document.getElementsByName("verse-iframe")[0].contentWindow; // Variables below (i.e. "menu-1") reference div id from your markup function receiveMessage(event) { var data = (typeof === "String") ? JSON.parse( : event var modalWindow1 = document.getElementById("ruben-1"); var modalWindow2 = document.getElementById("ruben-2"); var modalWindow3 = document.getElementById("menu-3"); var modalWindow4 = document.getElementById("menu-4"); // Variables below (i.e. "menu-1") reference the unique callback names entered for your hotspots in the Verse editor if (["identifier"] === "ruben-1") { = "block"; } if (["identifier"] === "ruben-2") { = "block"; } if (["identifier"] === "menu-3") { = "block"; } if (["identifier"] === "menu-4") { = "block"; } } var closeBtns = document.getElementsByClassName("modal-close"); for (var i = 0; i

    Any help will be appreciated! Thanks Guys


    $('.InvisibleHotspotComponent__root___aed99[aria-label="Chapter ' + chapterNumber + '"]').click();

    define chapterNumber on the button and fire the click..

    just a hint, hope it helps.


    Hey @chris_2080,

    Thanks for the help! Can you be more specific where should I place this line of code you provided?
    Is it going to be inside window.onload = function() { or outside?

    Also should I use a data-modal to fire the click or regular <a href="#ruben-1"></a>
    <button class="Butt BlueBg"><span>Learn More</span></button>

    I really appreciate the help man! :P

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.