Oh... duh! Thanks for the help Charlie that works great!
-----Original Message----- From: Charlie Griefer [mailto:[EMAIL PROTECTED] Sent: Friday, June 01, 2007 3:39 PM To: CF-Talk Subject: Re: javascript question the onchange() goes into the <select> element. <select name="NEW_Plate_to_make" onchange="displayStockLevels(this.options[this.selectedIndex].value);"> <cfloop query="getPlates"> <option value="#getPlates.ID#">#getPlates.Name#</option> </cfloop> </select> On 6/1/07, Chad Gray <[EMAIL PROTECTED]> wrote: > I thought this would be an easy one but I cant get it to work. > > I want a text input to change value when an option in a select box is changed. > > I am looping over my options in the select with database information. Do I > need to use something other then onChange? > > > <script> > function displayStockLevels(ID) { > document.frmDryOffset.stockLevels.value = ID; > } > </script> > > <input type="text" id="stockLevels" /> > > <select name="NEW_Plate_to_make"> > <cfloop query="getPlates"> > <option > onchange="displayStockLevels(#getPlates.ID#);">#getPlates.Name#</option> > </cfloop> > </select> > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Create robust enterprise, web RIAs. Upgrade & integrate Adobe Coldfusion MX7 with Flex 2 http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:279863 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

