FORM SUBMISSION PROBLEM
-
I am developing a real estate website. Now on the site are 4 combo boxes. It starts off with a province combo box. When a user selects a province, all the regions for that province are loaded into another combo box, and then if a region is selected, all areas for this region is loaded into another combobox. I do this by making a trip to the server everytime a selection is made. The form is submitted to itself (registration.asp). This works perfectly. My problem starts as soon as when I want to validat the fields and submit the data to another page. I can't because I am already submitting the form to itself (registration.asp). How do I trigger the javascript function when the submit button is clicked and when all fields are filled in submit it to another page, eg test.asp. Here I will retrieve and use the values. I would like to send my code so that you can look at it, not very complicated code. Please return ASAP! Thanks :suss:
-
I am developing a real estate website. Now on the site are 4 combo boxes. It starts off with a province combo box. When a user selects a province, all the regions for that province are loaded into another combo box, and then if a region is selected, all areas for this region is loaded into another combobox. I do this by making a trip to the server everytime a selection is made. The form is submitted to itself (registration.asp). This works perfectly. My problem starts as soon as when I want to validat the fields and submit the data to another page. I can't because I am already submitting the form to itself (registration.asp). How do I trigger the javascript function when the submit button is clicked and when all fields are filled in submit it to another page, eg test.asp. Here I will retrieve and use the values. I would like to send my code so that you can look at it, not very complicated code. Please return ASAP! Thanks :suss:
Handle the OnSubmit event of the form in the handler set form's action to "test.asp"
-
I am developing a real estate website. Now on the site are 4 combo boxes. It starts off with a province combo box. When a user selects a province, all the regions for that province are loaded into another combo box, and then if a region is selected, all areas for this region is loaded into another combobox. I do this by making a trip to the server everytime a selection is made. The form is submitted to itself (registration.asp). This works perfectly. My problem starts as soon as when I want to validat the fields and submit the data to another page. I can't because I am already submitting the form to itself (registration.asp). How do I trigger the javascript function when the submit button is clicked and when all fields are filled in submit it to another page, eg test.asp. Here I will retrieve and use the values. I would like to send my code so that you can look at it, not very complicated code. Please return ASAP! Thanks :suss:
agree with hspc. You can change the form's action property such as "test.asp" by javascript in form's submit event. Thinking-Asking-Thinking
-
Handle the OnSubmit event of the form in the handler set form's action to "test.asp"
How do I change this in the onsubmit() method? Isn't this the same as when the form is submitted to itself?