|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hello all:
I am currently doing something that takes a couple of values and outputs their product to a textbox. While Internet Explorer does this fine, NN 4.6 doesn't. Instead of the product, I get the string, "NaN". Anyhelp would be appreciated. Thanks, Jeremy =========================================== function compute(newtimevalue) { var current_matter = new String(document.newevent.c_matter.options.value); new_array = current_matter.split("-", 2); var nrate = 0; nrate = new_array[1]; document.newevent.hrs.value = newtimevalue; var tamount = nrate * newtimevalue; document.newevent.amount.value = tamount; } |
|
#2
|
|||
|
|||
|
I am sorry, I must point out that the reason quotes are escaped in my source is because this is output by PHP.
(which I am sure you figured it out) Thanks, ;^] |
|
#3
|
|||
|
|||
|
I'm not sure exactly where you went wrong, but I know that NaN stands for "Not a Number." (Like the function isNaN().)
|
|
#4
|
|||
|
|||
|
FYI: Use the parseInt() or parseFloat() functions to change the datatype to a number.
|
![]() |
| Viewing: Dev Shed Forums > Web Design > HTML Programming > Getting NaN -- What does this mean? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|