Create PopUp Upon Submission

  • Profile Image
    signdo
    Asked on July 27, 2013 at 11:25 AM

    hi thank you for your great website "jotform.com"

    i have one question please:

    how can i add an exit popup to my webform?????

    thank you very much

  • Profile Image
    jefreylandicho
    Answered on July 27, 2013 at 02:54 PM

    You can create an exit popup on webform by embedding the form using FORM SOURCE code.

    In the embed for source code, look for the submit button and add the function below 

    onclick = "FormPopUp()"

    e.g <button id="input_2" type="submit" class="form-submit-button" onclick = "FormPopUp()">

    then in your web page header,  add the script below

    function FormPopUp() { window.open('','Prvwindow','location=no,status=no,toolbar=no,scrollbars=yes,width=730,height=500'); document.test.action = "preview.html" document.test.target = "Prvwindow" document.test.submit(); }

    wherein preview.html is the page that would show in the popup.

    If you need further assistance, please contact us again.

  • Profile Image
    clairegraphics
    Answered on February 27, 2014 at 02:38 PM

    Hey Jotform!

    I am trying to do the exact same thing as the originator of this question. So when you click send message instead of directing the sender to another page I would just like a popup thank you message and close.

     

    I tried implementing the code that jefreylandicho above answered, but it doesn't seem to work for me.

     

    Please help!

  • Profile Image
    Mike_T
    Answered on February 27, 2014 at 05:42 PM

    @clairegraphics,

    You can get a similar pop-up code from the following Stackoverflow thread:

    How to submit form in new pop up on button onclick action

    Note, this method will not close your form, but you will see your custom page on the pop up.

    Alternatively, you can try something from the following JotForm thread:

    Pop up Thank you and redirect to complete submissions

    If you need any further assistance on this, please create a separate thread. Thank you.