Hello, I have a short form section on my web page where I would like to redirect the user to a specific URL upon clicking the submit button. The form has only 1 question, with the answers in <select><option> format. Once the customer decides on what option they want to choose and click submit, the page should be able to read the value of the option seleted by the user and redirect them to the corresponding URL. For example: option A --> a.html; option B --> b.html
May I know how I can go about doing that? Thank you
The website is https://www.1010media.sg/ . The form is right above the "Our Films" part
Daniel Mulroy last edited by
I have an answer for you. There a few different ways of doing it, but this is what I thought might be simplest. 3 easy steps!
1. Select your dropdown element and open the paintbrush. Go to "Identification" at the bottom and give it the ID of "service_selector"
2. Again on the dropdown element, modify each of your options so that their "Placeholder" remains the same, but the 'Value' becomes the name of the page you want to redirect to (the part that would appear in the URL).
For example, for the page "https://www.1010media.sg/stocklibrary.html", you would enter "stocklibrary.html"
window.location.href = "/"+$("#service_selector select").value;
Good luck, let us know if you need any more help.
Wassim last edited by
In addition to @Daniel-Mulroy explanation, if you use a form, for the 3rd step you need to go to
and set the JS code he provided
I manged to get it work with the simple steps you provided. Thank you very much!