RSS Forums RSS
Please support our ColdFusion advertiser: Programming Forums
Views: 4737 | Replies: 3
Reply
Join Date: Jun 2005
Location: TN
Posts: 2
Reputation: walkerst is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
walkerst walkerst is offline Offline
Newbie Poster

Help with a search form/page

  #1  
Jun 11th, 2005
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
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jun 2003
Location: Malaysia
Posts: 313
Reputation: red_evolve is on a distinguished road 
Rep Power: 6
Solved Threads: 0
red_evolve's Avatar
red_evolve red_evolve is offline Offline
Posting Whiz

Re: Help with a search form/page

  #2  
Jun 13th, 2005
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.
"Study the past if you would define the future" - Confucius
Reply With Quote  
Join Date: Jun 2005
Posts: 15
Reputation: Torch7 is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 1
Torch7 Torch7 is offline Offline
Newbie Poster

Re: Help with a search form/page

  #3  
Jun 24th, 2005
How many records are you dealing with?

Have you considered the "query of a query" route if there are not that many records returned.
Reply With Quote  
Join Date: Apr 2006
Posts: 27
Reputation: anuradhu is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 1
anuradhu anuradhu is offline Offline
Light Poster

Re: Help with a search form/page

  #4  
Apr 18th, 2006
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...
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 2:10 am.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC