I'm developing a flash for in CF that records a quantity number against a stock item in a warehouse. The stock item has two parts a Name 'Phone' and a Code 'xfs34'. I have a selection list auto populate the Name from a table and would like to have a textbox auto fill with the corresponding code and update onChange. Is there a simple way to do this? My Query: <cfquery name="stkchk" datasource="SD"> SELECT NameID, StockName, TitanCode FROM StockNameTable </cfquery> Code (markup): Select list and textbox: <cfselect name="StockName" size="1" id="StockName" title="StockName" label="Item" width="150" type="select" onChange=""> <cfoutput query="stkchk"> <option value="#stkchk.StockName#">#stkchk.StockName#</option> </cfoutput> </cfselect> <cfinput id="TitanCode" title="TitanCode" name="TitanCode" width="150" type="text" label="Titan Code" readonly="yes" value="#stkchk.TitanCode#" /> Code (markup): Thanks in advance any help is greatly appreciated..
If you are using Coldfusion 8, you can use cfajax. http://www.indiankey.com/cfajax/ If you are using other versions, you can always use a prototype to call ajax...probably your best method anyway.