AnsweredAssumed Answered

Light box form capture before embedded YouTube Video loads.

Question asked by d28129c6b3fa25b911f7e2ce33ecdc26b7a5161a on Jun 24, 2014
Latest reply on Nov 4, 2014 by 51406

     Hello Everyone,

     I am trying to setup a landing page that a visitor can go to view a YouTube video in Marketo. I want visitors who have filled out basic information on the linking pages to be able to view it without a form popping up but visitors who have been linked to the page to fill out a brief form before the video loads.

     So what I have done is place a rich text box onto the page and used 2 divs:

 <div id="image">
     <a style="display: block;" onclick="functionOne()" href="#" _mce_style="display: block;" _mce_href="#">
     <img style="width: 460px;" src="Webinar_icon_title.jpg" _mce_style="width: 460px;" _mce_src="Webinar_icon_title.jpg">

     <div id="video" style="display: none;" _mce_style="display: none;">
     <div class="cf_widgetLoader cf_w_1234567891234567891234_Video"></div>

     The image loads on the page load and the video is hidden so the visitor has to click the image of the video to load it. The click calls the javascript function functionOne()


     <script  src="//;">

     <script src="//"></script>
     <form id="mktoForm_1000"></form>

     <script type="text/javascript">

     function functionOne() {

      MktoForms2.loadForm("//", "789-XYZ-123", 1000, function (form)
        form.onSuccess(function(values, followUpUrl)
        return false;

     function watchVideo() {

     function loadVideo() {
      document.getElementById('video').style.display = 'block';

     function hideImage() {
      document.getElementById('image').style.display = 'none';

     The code is suppsoed to load the form in a lightbox and the user fills it out and on successful submission the watch video triggers which hides the image and displays the video. But when I run this the watch video sequence is ran dispite the form not being submitted and the visitor only needs to close the video to watch the video without actually filling out the form.

     I was hoping to have just a simple boolean check to see if the visitor was already Marketo cookied but I could not find anything in the API to help with that either.

     Has someone done something like this before and had success in requiring a form be filled out before allowing content to be viewed on the page?

     Issues I have ran into trying to get the code to work have varied from the form refusing to submit to not loading for the submitter after refreshing the page but not allowing the video to load.

     Thanks for any help.