Aidi
|
| Posted: 10/31/2004, 7:23 AM |
|
I am trying to add up some values using javascript however I keep getting a NaN error.
Record.TotalCost.value = Record.UnitCost.value * Record.NoOfDays.value
UnitCost is a Float in CCS.
NoOfDays is a Int in CCS.
Any idea what is the error?
|
|
|
 |
peterr
Posts: 5971
|
| Posted: 10/31/2004, 1:11 PM |
|
I don't know what is "NaN" but you cannot use ASP syntax in JavaScript. Those are 2 different programming languages/technologies. If you're working with JavaScript please use JavaScript syntax.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
 |
 |
cruisin
Posts: 31
|
| Posted: 11/03/2004, 1:42 PM |
|
I believe NaN = Not a Number
I've seen it show up in date fields that are displayed where there is a null value.
Other places where numbers are interpreted as text
|
 |
 |
Tuong Do
|
| Posted: 11/04/2004, 2:33 PM |
|
Use this
document.TotalCost.value = document.UnitCost.value * document.NoOfDays.value
"Aidi" <Aidi@forum.codecharge> wrote in message
news:64185037a2ef11@news.codecharge.com...
>I am trying to add up some values using javascript however I keep getting a
>NaN
> error.
>
> Record.TotalCost.value = Record.UnitCost.value * Record.NoOfDays.value
>
> UnitCost is a Float in CCS.
> NoOfDays is a Int in CCS.
>
> Any idea what is the error?
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>
|
|
|
 |