Thanks Dave.  If you would, please send me the addresses for the CF-Talk and
JS-Jive lists.  I would appreciate it.  Again, thanks.

Israel Rose, CSQE
Functional Area Lead
Software Quality Assurance
System and Software Processes
Lockheed Martin Aeronautics Company
Dept 271M  MZ 0674
Marietta, GA  30063
770-494-1167 (Office)  1-877-509-1529 (Pager)

> -----Original Message-----
> From: Dave Watts [SMTP:[EMAIL PROTECTED]]
> Sent: Tuesday, December 04, 2001 10:47 AM
> To:   CF-Server
> Subject:      RE: Using "OnChange" in a CFFORM
> 
> 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.selectedInde
> x]
> value;"
> 
> Dave Watts, CTO, Fig Leaf Software
> http://www.figleaf.com/
> voice: (202) 797-5496
> fax: (202) 797-5444
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
------------------------------------------------------------------------------
To unsubscribe, send a message to [EMAIL PROTECTED] with 
'unsubscribe' in the body or visit the list page at www.houseoffusion.com

Reply via email to