First comment is that its JavaScript and not Java. Two completely seperate
langauges/entities. You problem is that javascript thinks that your forms
fields contain strings, not integers, so you need to convert em. I believe
its called parseInt, but I cant remember exactly, do that then do the
addition and it will work great.
Mike
----- Original Message -----
From: "Picker, Mark P" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, July 04, 2000 9:14 PM
Subject: SLightly OT : Addition in JAVA
> Hi All,
>
> This is slightly off topic.
>
> I have a cold fusion form that I'm working on and I want some of the cells
> to automatically add together when a cell value changes. The problem I'm
> getting is, that say you add two cells, 500 and 500 together, instead of
> getting 1000 I get 500500.
>
> The code I use is as follows :
>
>
> document.form1.fldCourseCosts.value=document.form1.fldGrandTotal.value +
> document.form1.fldAdminCosts.value ;
>
> I am very new to JAVA so I hope someone can help.
>
> Cheers
> Mark Picker
> [EMAIL PROTECTED]
>
> --------------------------------------------------------------------------
----
> Archives: http://www.eGroups.com/list/cf-talk
> To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
>
------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.