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>
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Macromedia ColdFusion MX7
Upgrade to MX7 & experience time-saving features, more productivity.
http://www.adobe.com/products/coldfusion?sdid=RVJW

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:279861
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to