2 Replies Latest reply on Aug 8, 2015 4:07 PM by VizKid

    Issues with Youtube embedding and Jscript event handler

    VizKid Level 1

      Hello!

       

      I'm having some issues with a button's click script, which should create an empty(). that is filled with an iframe youtube embed. The whole thing works fine inside of Edge Animate, but when I put it up on my site everything but the youtube videos worked. We're very close to finalizing our site and this is one of the only things holding us back.

       

      The page is live with errors here:

       

      http://www.etreeoflife.com/timeline

       

      I've uploaded a zip file of the project here:

       

      https://app.box.com/s/j5u1yq1vtyf2rnhywfwdkd3ww9tmkn17

       

      Here's the error I'm getting in debug: "Javascript error in event handler! Event Type = element" associated with edge.6.0.0.min.js

       

      The buttons show up on the left side at each section, and each one opens up a new youtube video to play. There's also an exit button that will close the youtube video, and my up and down arrows will also do that. Here's the script I used to introduce the youtube video:

       

      if (sym.$("ytVideobio").is(":visible")) {

       

          sym.$("ytVideoBOX").hide();

          sym.$("VEXIT_BUTTON").hide();

          sym.$("ytVideobio").hide();

          sym.$("ytVideobio").empty();

       

      } else {

      sym.$("VEXIT_BUTTON").show();

      var youtube = $("<iframe/>");

       

          sym.$("ytVideobio").empty().append(youtube);

       

          youtube.attr('type', 'text/html');

       

          youtube.attr('width', '680');

       

          youtube.attr('height', '380');

       

          youtube.attr('src', 'https://www.youtube.com/embed/iR2AyybowPc?rel=0&controls=1');

       

          youtube.attr('frameborder', '1');

       

          youtube.attr('allowfullscreen', '0');

       

          sym.$("ytVideobio").show();

          sym.$("ytVideoBOX").show();

       

      }

       

      Any help would be greatly appreciated, we're really excited to get the website up. Thanks!