I have a form that has 4 select boxes on it. I am able to use window.location to reload the page and then use php to populate the second select box with the options that are relevent to the first select box.
I also have a select box that is a fromYear and another select box that is a toYear. The user would use this form to select make, model and year ranges of a car that they are looking for.
When the user chooses the make of the car and window.location which is javaScript produces a url such as the following:
vehicleSearch.php?search=basic&make_id=HONDA
I also need the url to include the selected fromYear and toYear. I need the url that is produced to be much like the following.
vehicleSearch.php?search=basic&make_id=HONDA&fromYear=1998&toYear=2008
How do I do this?
Here is the javascript that I am using to reload the page with.
<select name="make_id" onchange="window.location='vehicleSearch.php?search=basic&make_id='+make_id[selectedIndex].value">
If you have a function that will do this or any suggestions it would be appreciated.