It seems I have found something really close, but there is no 'number greater' 'number smaller' option here:
What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.
At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.
We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.
How can I open a webpage in a new window when a user clicks submit on a form?Asked by hig2145 on March 31, 2011 at 06:24 PM
how can I open a webpage in a new window when a user clicks submit. I need the a new web page to open as well as a thank you message to the user. the web page that needs to be opened will depend on the some condition. ie it will vary
In order to this you would need to either:
2. Set up a custom thank-you page which spawns a new window when it opens. Something like
If you need to dynamically set the source url of the new window then it would be best to use the custom thank you page. Read the value of your condition and then write out the onload code using some PHP, ASP, etc.
So in the following PHP example:
$newURL = "some value that you've just set";
hope this helps. if not them please get back to me ,
Please follow these steps:
1. Get the full source code of your form.
2. Look for the first <form> tag and insert thhe following code:
so that it becomes:
<form class="jotform-form" action="http://www.jotform.com/submit.php" method="post" name="form_10424741277" id="10424741277" accept-charset="utf-8" onSubmit="window.open('http://www.example.com/example.htm','mywindow','width=400,height=200')">
The highlighted numbers represent the Form ID, so change it accordingly. While the URL http://www.example.com/example.htm represents the page you want to pop up (i.e. Thank You message) once the Submit button is clicked.
We hope you find this information helpful. Please let us know if you need further assistance.
Thanks! I did this exactly (copied and pasted the "onSubmit" code above right into the source code at the location indicated), but when I click Submit on the form, it still just goes to a full-size page (not opening in a new window).
I noticed that even with the URL specified in the new onSubmit code, if I have the URL redirect set in the JotForm Thank You options, it goes to that page, and if I change it back to the default it goes to JotForm's "Thank You" page. Do I need to override JotForm's Thank You options in some way to get the new onSubmit code to redirect to a new small window?
What I advise you to do is to use the code below and insert it inside the body tag of your custom Thank You page (hosted in your server)
<body onLoad="window.open('http://www.example.com/example.htm','mywindow','width=400,height=200')" />
This should open a new window containing the new webpage while the thank you message is displayed on your self-hosted webpage which you will configure as the Thank You URL for your form.
Feel free to ask if you need more information regarding this topic. You may also open a new thread if you have questions which you feel are not related to the issue at hand. Thanks!
Success with the creation of the small new window, so thank you! However, I'm still also getting the full-sized window (when I click submit, a full-sized version of my Thank You page loads first, then the small window with the same content opens on top of it). Any idea how to fix this? Thanks!
Sorry if I had the idea that you wanted to open a new pop-up window together with the actual thank you page which loads right after the form was submitted.
Do you want the form to stay as it is and not redirect to any page, but instead open the thank you page in a pop-up window? If that's what you're trying to do, let me say that it is not quite easy. It would require some advanced scripting to implement. HTML forms are required to redirect to the actual action page
Yes, I was hoping to open the thank you page in a pop-up window (the form is a quiz, and I wanted the submit button to redirect to a small "Correct..." or "Incorrect..." window without navigating away from the page the form is on). Looks like I may need to rethink that or advance my scripting skills. :)
Thank you as always for the great support from JotForm!
I believe this method of displaying the thank you page in a pop-up page without navigating away from the form has been requested before. I added it to our list of user requests but I have not heard anything from our developers yet.
To be honest, I think our development team are not too keen on implementing such a feature since it would be a little too advanced for the common user and can potentially present more problems.
Anyway, I personally commend you for taking your form to the next level. Hope I was able to help in my own little way. Thank you for using Jotform and have a great day!
I would need the same function, with a little tweak: the code should decide which page to open (from 3 pages), depending on the value given. The value will be a number, and if it is between certain limits then the code opens a predefined page.
Could anyone help please? (i do not know js, but I suppose it is not that hard)
Thanks in advance,
If you could please create a new thread with a description of what you are trying to accomplish, we will be happy to help. As this thread is 3 years old, it would be much easier to start fresh.