943,735 Members | Top Members by Rank

Ad:
  • ColdFusion Discussion Thread
  • Unsolved
  • Views: 6434
  • ColdFusion RSS
Jun 11th, 2005
0

Help with a search form/page

Expand Post »
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
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
walkerst is offline Offline
2 posts
since Jun 2005
Jun 13th, 2005
0

Re: Help with a search form/page

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.
Reputation Points: 53
Solved Threads: 1
Posting Whiz
red_evolve is offline Offline
313 posts
since Jun 2003
Jun 24th, 2005
0

Re: Help with a search form/page

How many records are you dealing with?

Have you considered the "query of a query" route if there are not that many records returned.
Reputation Points: 10
Solved Threads: 1
Newbie Poster
Torch7 is offline Offline
15 posts
since Jun 2005
Apr 18th, 2006
0

Re: Help with a search form/page

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...
Reputation Points: 12
Solved Threads: 2
Light Poster
anuradhu is offline Offline
28 posts
since Apr 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ColdFusion Forum Timeline: Posting News according to today's date
Next Thread in ColdFusion Forum Timeline: Coding for drop down boxes





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC