Center a Popup Form

  • Profile Image
    EffieMcNair
    Asked on February 11, 2018 at 09:54 PM

    Hi There,

    I am wondering how to make the Popup form opening in the middle of the screen rather than in the upper left corner? (website link attached - roll down to see 'Instant Quote' buttons)

    Thanks,

    Effie

  • Profile Image
    BJoanna
    Answered on February 12, 2018 at 05:33 AM

    Inside of this article, you can find how to center the popup form:

    https://stackoverflow.com/questions/4068373/center-a-popup-window-on-screen 

    You will have to add the following script to your webpage:

    <script language="javascript" type="text/javascript">

            function OpenPopupCenter(pageURL, title, w, h) {

                var left = (screen.width - w) / 2;

                var top = (screen.height - h) / 4;

                var targetWin = window.open(pageURL, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=' + w + ', height=' + h + ', top=' + top + ', left=' + left);

            } 

        </script>

    and modify the popup code of your form to this:

    <a target="_blank" href="javascript:void(0)" onclick="OpenPopupCenter('https://www.jotform.com/80368192005857', 'INSTANT QUOTE', 700, 500);">INSTANT QUOTE</a>

    You can also use a LightBox form:

    How to Create a Lightbox Form

    Hope this meet what you are looking for. 

  • Profile Image
    EffieMcNair
    Answered on March 24, 2018 at 08:18 AM
  • Profile Image
    John_Benson
    Answered on March 24, 2018 at 10:38 AM

    Hi EffieMcNair,

    We receive a blank reply from you. Is the issue resolved? If yes, please disregard this message.

    If not, please reply again and make sure you're logged in to your account. 

    Thank you.