First, before responding to your specific question, I'd like to point out that this is perhaps not the best forum for that question. This list is for server-specific issues (server configuration, management, etc). While you're free to ask this question here, you're less likely to get a useful response, I think, than you would from the CF-Talk or JS-Jive lists.
> Is it possible, without formally defining a JavaScript method, > to use "OnChange" in a Select List Box from within a CFFORM to > change a numeric value based on the item selected from the list > box? Yes, it's possible. You can do anything within CFFORM using JavaScript that you could do in a regular HTML form using JavaScript, although you may do it slightly differently to deal with the form's onsubmit event (which doesn't concern your example at all). > For example, > > <CFSET Total = 0> > <SELECT NAME="#XiVal#" > onChange="document.CFForm_Name.Total=+this.options[this.select > edIndex].value > "> > <CFLOOP Index="Rng_Of_Vals" From="#Select_MinVal#" > To="#Select_MaxVal#"> > <OPTION>#Rng_Of_Vals# > </CFLOOP> > </SELECT> > <Input Name="A_TOT" > Type = "hidden" > Value="#Total#"> > </Input> > > If not, can this be done using a JavaScript method? Examples would > be welcomed. Thanks in advance. You can certainly do what you're trying to do, but your syntax has a couple of problems. First, what you want to do is change the value of the hidden field, right? I'll assume further that you want to take the current field's value, and add the selected value to it. To do that, your onchange event might look like this: onchange="document.CFForm_Name.A_TOT.value+=this.options[this.selectedIndex] value;" Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm ------------------------------------------------------------------------------ To unsubscribe, send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body or visit the list page at www.houseoffusion.com
