Andy

Does this work?

function test(controlnum) {
  elt = document.forms[0]["interest" + interest];
  elt.value = parseInt(elt.value) + 1;
}

Nick

-----Original Message-----
From: Andy Ewings [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 24, 2001 12:18 PM
To: CF-Talk
Subject: OT Javascript question


I'm having a mind blank....arghhh.  I'm trying to incremtnet the value of a
control in a form by one where part of the controls name is poassed in as a
variable.  Probably best I explain with the code snippet:

function test(controlnum) {
         "document.forms[0].interest" + interest + ".value" =
eval("document.forms[0].interest" + interest + ".value") + 1;
}

I have tested using alert and the The RHS of the equation is computed
correctly.  I need to let javasript know that the LHS of the equation is an
object in the page rather than just a string but I can't remeber
how!....anyone help
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to