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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I populate the other dropdown value based on the first dropdown

Status
Not open for further replies.

yogi564

Programmer
Joined
Oct 16, 2001
Messages
48
Location
AU
Hi all,
Can somebody help me out. I wondering if there is a way to populate other dropdown box based on the first dropdown selection. The coding is given below

<select name=&quot;pan_cementum_cd&quot;>
<cfloop query=&quot;PC&quot;>
<option value=&quot;<cfoutput>#PC.Code#</cfoutput>&quot;><cfoutput>#PC.Code#|#PC.Description#</cfoutput></option></cfloop>
</select>
*

Pan Type <select name=&quot;pan_type_cd&quot;>
<cfloop query=&quot;PT&quot;>
<option value=&quot;<cfoutput>#PT.Code#</cfoutput>&quot;><cfoutput>#PT.Code#|#PT.Description#</cfoutput></option>
</cfloop>
</select>


Pan Continuity
<select name=&quot;pan_continuity_cd&quot;>
<cfloop query=&quot;pcon&quot;>
<option value=&quot;<cfoutput>#pcon.Code#</cfoutput>&quot;><cfoutput>#pcon.Code#|#pcon.Description#</cfoutput></option>
</cfloop>
</select>






Pan Structure
<select name=&quot;pan_structure_cd&quot;>
<cfloop query=&quot;PS&quot;>
<option value=&quot;<cfoutput>#PS.Code#</cfoutput>&quot;><cfoutput>#PS.Code#|#PS.Description#</cfoutput></option>
</cfloop>
</select>

From this &quot;pan_cementum_cd&quot; dropdown field I need to control what should appear in the other 3 dropdown values. Is there a way to do it, if so please help me out. Thank's



 
The answer is JavaScript, and here is a link to one of my favorite sites for JavaScript. Scroll down and look for Dropdown Box Population. I haven't used this particular one, but there are a few others in this same list that do similar things.

Calista :-X
Jedi Knight,
Champion of the Force
 
I try to use this coding and it doesn't help much at all. The reason for this is that the <cfoutput> tag doesn't click properly with the array define at the top. I need something that works with the <cfoutput> tag's. Thank's.

Bear
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top