CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 Javascript Compute values

Print topic Send  topic

Author Message
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
View profile  Send private message
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
View profile  Send private message
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/
>


Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.