How do I make a Lightbox Form to Auto-Pop Up

  • Profile Image
    ToToPaPa
    Asked on February 22, 2015 at 02:45 PM

    Hi,

    Thanks for this tutorial!

    I have a little problem, I'm trying to autopopup a lightbox with a delay but the windows title is not full sized... It's not aligned with the form.

    var JFL_50513172512342 = new JotformFeedback({

    formId:'50513172512342',

    base:'http://jotformeu.com/',

    windowTitle:'As you can see',

    background:'#ffffff',

    fontColor:'#000000',

    type:false,

    height:400,

    width:750,

    openOnLoad:false

    });

    var delayseconds = 1;

    function pause() {

    myTimer = setTimeout('whatToDo()', delayseconds * 1000)

    }

    function whatToDo() {

    document.getElementById('lightboxdelay').click();

    }

    window.onload = pause;

    Can you help me?



    This is a re-post of a comment on How to Auto-popup a Lightbox Form

  • Profile Image
    BDAVID
    Answered on February 22, 2015 at 04:54 PM

    Is your auto-popup lightbox not displayed this way?

    If not please go to this link, copy and paste that code: http://pastiebin.com/54ea4e8e1e563

  • Profile Image
    ToToPaPa
    Answered on February 25, 2015 at 06:22 AM

    Yes it works...

    I think there is a conflict somewhere with my code and I don't get it :/
    Thanks you anyway!

  • Profile Image
    Jeanette
    Answered on February 25, 2015 at 10:44 AM

    Please share with us the page where you are trying to embed the lightbox in order to inspect it and assist you further.

     

  • Profile Image
    innercityskylineinc
    Answered on December 20, 2016 at 02:30 PM

    Having Similar Problem 

     

     <script src="https://form.jotform.com/static/feedback2.js?3.3.REV" type="text/javascript"> 

     var JFL_51317398958167 = new JotformFeedback({ 

     formId: '51317398958167', 

     base: 'https://form.jotform.com/', 

     windowTitle: 'Patio Quotes', 

     background: '##1b0b0b', 

     fontColor: '#FFFFFF', 

     type: '1', 

     height: 650, 

     width: 800, 

     openOnLoad:false }); 

     </script>

    <script language="JavaScript">

    var delayseconds = 5;

        function pause() {

        myTimer = setTimeout('whatToDo()', delayseconds * 1000)

        }

       function whatToDo() {

    document.getElementById('lightboxdelay').click();

        }

    window.onload = pause;

    </script>

     

    <a id="lightboxdelay" class="lightbox-51317398958167" style="cursor:pointer;color:blue;text-decoration:underline; display:none;">Tenez-moi au courant !</a>

     

    Any suggestions?

  • Profile Image
    david
    Answered on December 20, 2016 at 04:11 PM

    @innercityskylineinc Since this thread is quite old, I have moved your request to a thread of its own.  I will address your request in the follow thread shortly:

    https://www.jotform.com/answers/1016393