Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can anyone tell me how to have an i

Status
Not open for further replies.

mx3com

Technical User
Oct 29, 2000
9
0
0
CA
Can anyone tell me how to have an item chosen from one menu drop down list change the contents of a second drop down list.
I have seen this done with javascript, but was wondering if it is at all possible to do, using Cold Fusion, or maybe a combination of CF and JS.
I would like to pull the information for both the drop down menu lists from a database.
Anyone have a clue as to what I could do to accomplish this?

Thanks in advance!

Jeff Aycan - MX-3.com
 
Check out for a working example of the menu interaction. It's a Javascript thing, the functionality not terribly difficult to recreate.

ColdFusion will generate the dropdown menus for you ... try something along these lines:
Code:
<cfquery datasource=&quot;#datasource# name=&quot;list&quot;>
SELECT Item
FROM ItemTable
ORDER BY Item
</cfquery>

<form name=&quot;item_search&quot;>
<select name=&quot;ItemMenu&quot;>
 <option value=&quot;0&quot;>items:
 <cfoutput query=&quot;list&quot;>
  <option value=&quot;pagetwo.cfm?item=#URLEncodedFormat(Item)#&quot;>#Item#
 </cfoutput>
</select>
</form>

There are simple JavaScripts available (from places such as to make the dropdown menu a linking menu. However, your desired application will need a bit more complexity. Hope you're up to it!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top