Click to See Complete Forum and Search --> : stuck on recordset query and form.submit


jarrodlytle
07-28-2005, 12:45 PM
i have created a series of drop down lists in a form. each list is linked together, so if in the first list you choose Honda(make), the second list will change to only honda cars(model).

The problem is...

i have each list submit the form onchange. I need the form to submit after the lists query there information. Cant figure it out :(

so if i choose honda(make) the next list is honda cars(model).
Then i choose ford(make) and the form submits ford as the (make) but submits honda(model) before the list can change to ford(models)

Thanks in advance.

slyfox
07-31-2005, 05:24 AM
There are two ways to do this:

1. Use javascript:
when page load then dynamically write javascript variables containing your different makes and models, each drop downlist must not "submit" onChange, but rather call a function that will use the current selection, search thru your variables for select make, then update the model dropdown with those of the make. The downside of this is that you'll have to load all that info to one page (could affect loading speed), but the upside is that you don't have to annoingly redirect (using ASP only) everytime user makes a selection.

2. Use ASP:
When user makes a selection then onChange will submit the selection thru the form wich you just receive on the other side and dynamicly update your models dropdown. Remember, if your dropdownbox's name is set to make, you must request "make" from the form post and use it's value to know what is selected and what to do next.

Hope this helps