Convert 2 tier to 3 tier dynamic drop down.
Hello Everyone,
I have some code (posted below) that works great to develop a 2 level drop down where the second selection is based on the first. What I want to do is adapt this to be a 3 level drop down where the second selection is based on the first selection and the third selection is based on the second selection. I have seen several examples but I am not a coder and do not know java script so I was not able to make them work. The example below I understand so I would like to use this format.
Any help would be much appreciated since my deadline is fast approaching.
Thanks
<cfif isDefined('form.Park')>
<cfset page.Park = form.Park>
</cfif>
<cfoutput>
<cfquery name="get_Main_Group" datasource="Landbird_Monitoring">
SELECT DISTINCT tbl_Sites.Unit_Code
FROM tbl_Sites
ORDER BY tbl_Sites.Unit_Code;
</cfquery>
<form name="DropDown" method="post">
<select name="Park" required="yes" onChange="this.form.submit()">
<option>Park</option>
<cfloop query="get_Main_Group">
<option value="#Unit_Code#" <cfif isDefined('form.Park')><cfif form.Park eq "#Unit_Code#">selected</cfif></cfif>>#Unit_Code#</option>
</cfloop>
</select>
<cfif isDefined('page.Park')>
<cfquery name="get_Sub_Group" datasource="Landbird_Monitoring">
SELECT DISTINCT tbl_Sites.Unit_Code, tbl_Sites.Site_Name
FROM tbl_Sites
WHERE (((tbl_Sites.Unit_Code)='#page.Park#'))
ORDER BY tbl_Sites.Unit_Code, tbl_Sites.Site_Name;
</cfquery>
<select name="Route" required="yes" >
<option>Route</option>
<cfloop query="get_Sub_Group">
<option value="#Site_Name#">#Site_Name#</option>
</cfloop>
</Select>
<br>
</cfif>
</CFOUTPUT>
<input name="Submit" type="submit" value="Click Here" formaction="Sum_Bird_SpeciesList_Route.cfm">
</form>
