I'm very new to ColdFusion, and I have a question that's stumping me. In my application, I have a category and subcategory (which is related to the category). I want the user to be able to select a choice from a drop-down box that lists both the category and subcategory. But I need to pass the variables separately to the next page. <br><br>When the user comes back to the page, the category and subcategory must reflect what's in the database already. So far, the application does reflect what's in the database, and when they change the selection, the category is passed correctly. But the subcategory is not passed at all. Is there a way to set an onChange property of the select box to update the hidden variable, or is there another way to do this?<br><br>Thanks very much in advance! Here's the part of the code for the queries and select box...<br>-----------------------------------<br><br><CFQUERY DATASOURCE = "MyApp" NAME = "GetCategory"><br> SELECT Categories.CategoryName, <br> Categories.Category, <br> Subcategories.Subcategory<br> FROM Categories, Subcategories<br> WHERE Categories.Category = Subcategories.Category<br> ORDER BY Categories.Category, Subcategories.Subcategory<br></CFQUERY><br><br><CFQUERY name="ViewProduct" Datasource="MyApp"><br> SELECT Items.ProductID, <br> Items.CompanyID, Items.Image, Items.Catalog, Items.Product,<br> Items.UnitPrice, Items.Category,<br> Items.Subcategory,<br> FROM Items<br> WHERE Items.CompanyID=#client.CompanyID#<br></CFQUERY><br><br><SELECT NAME = "Category"><br> <CFOUTPUT QUERY = "GetCategory"><br> <CFIF #ViewProduct.Category# IS #Category# AND <br> #ViewProduct.Subcategory# IS #Subcategory#><br> <OPTION VALUE = "#Category#" SELECTED>#CategoryName#: #Subcategory#</option> <br> <CFELSE><br> <OPTION VALUE = "#Category#">#CategoryName#: #Subcategory#</option><br> </CFIF><br> </CFOUTPUT><br></SELECT><br><br>And further down I have a hidden variable...<br><INPUT TYPE="hidden" NAME="Subcategory" VALUE=#ViewProduct.Subcategory#>