Time delay in lightbox embed codes is not working

  • Profile Image
    bgringer912
    Asked on September 17, 2014 at 08:33 AM

    The delay is not working

    AND the header where the x box is (to close the form) is not legible. I tried the other styles where the x is outside the form but it completely is not visible.

    http://www.bonnie-gringer.com

     

    The lightbox on the left has a delay code (shown below) and the one on the right does not.

     

    <script src="//max.jotfor.ms/static/feedback2.js?3.2.3638" type="text/javascript">

    var JFL_42584417996167 = new JotformFeedback({

    formId:'42584417996167',

    base:'http://jotform.us/',

    windowTitle:'',

    background:'#F52727',

    fontColor:'#FFFFFF',

    type:false,

    height:370,

    width:260,

    openOnLoad:true

    });

    </script>

    <a id="lightboxdelay" class="lightbox-42584417996167"</a>

    <script language="JavaScript">
    var delayseconds = 5;
        function pause() {
        myTimer = setTimeout('whatToDo()', delayseconds * 1000)
        }
       function whatToDo() {
    document.getElementById('lightboxdelay').click();
        }
    window.onload = pause;
    </script>

  • Profile Image
    Welvin
    Answered on September 17, 2014 at 09:46 AM

    Hi,

    In your lightbox codes, remove the following line:

    openOnLoad:true

    This line of codes is used to auto popup the form, but it's not required when you set a time delay to it.

    The problem with regards to the close button is move to a new thread: http://www.jotform.com/answers/430148, we'll answer it shortly after this one.

    Thank you!

  • Profile Image
    bgringer912
    Answered on September 17, 2014 at 11:23 AM

    Welvin - The Delay works perfectly now that I removed the "OpenOnLoad:True".

    Thank you!!

    The only thing remaining is why the header (red with x-close) is cut-off. I changed the height to 407 as you suggested.

    Thank you again,

    Bonnie

  • Profile Image
    Welvin
    Answered on September 17, 2014 at 12:22 PM

    Hi Bonnie,

    Please follow the cut off issue here: http://www.jotform.com/answers/430148. We mean to separate every problem so we can focus on it - without the need to check what issues are resolved and what not.

    Thank you!