0

need help with a search form i've been asked to do for a friend.
i've done forms in the past, but not one like this. there will be 2 pick
lists on this form. to keep things simple, the database has 2 fields: main_heading, and sub_heading. I can generate the first pick list by using a select distinct to get a unique listing...but the second pick list has to be generated by what is choosen in the first. can i do that on the same page ?

thanks. !!
scott

4
Contributors
3
Replies
5
Views
12 Years
Discussion Span
Last Post by anuradhu
0

You could use iframe to do that, or XMLHTTP.
Those two are what I know, but for sure there are other alternatives.
With iframe, at the onchange of the first list, you call a jscript function.
In the jscript function, you create an iframe and therefore, direct the iframe to another cfm page. In that cfm page, you cfquery or whatever, to get the second list that you wanted. You could fill in the second list with parent.document.yoursecondlist with its values.

I hope I'm not confusing you.
If you understand the logic properly, this is not tough to do.

0

How many records are you dealing with?

Have you considered the "query of a query" route if there are not that many records returned.

0

try this:

on change of the first combo/list submit the form and pass the value of the combo to the query to fetch the records satisfying this value....
then populate the second combo accordingly based on the recordset from the second query

hope this helps...

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.