PDA

View Full Version : Dynamic dropdown filter results on page


wang_00769953
09-04-2009, 04:07 PM
Is it possible to build a dynamic dropdown that when you make a selection it would filter out a recordset result on the same page without using a button like this page here

http://www.stebro.net/html/Default.aspx?PageMenuID=1282

if you select a model it filters out the results based on your selection, then when you select a submodel it filters the result more? if this possible with dynamic dropdown?

Jason Byrnes
09-08-2009, 09:36 AM
That page uses javascript to submit the form on the onchecnge event of the select list:

for example:
<form id="form1" name="form1" method="post" action="">
<label>
<select name="select" id="select" onChange="document.form1.submit()">
<option value="1">one</option>
<option value="2">two</option>
<option value="3">three</option>
</select>
</label>
</form>

In this case, you would so much be using dynamic drop downs. Since the form is posting each time the select list is changed, you can filter the recordset that populates the child list on the information submitted by the parent list. These two lists can also be used to filter the results recordset.