HTML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignHTML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 18th, 2000, 11:05 AM
jeremydh jeremydh is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2000
Posts: 2 jeremydh User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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;
}

Reply With Quote
  #2  
Old October 18th, 2000, 11:07 AM
jeremydh jeremydh is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2000
Posts: 2 jeremydh User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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,

;^]

Reply With Quote
  #3  
Old October 18th, 2000, 01:52 PM
Dogg Dogg is offline
Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2000
Posts: 9 Dogg User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I'm not sure exactly where you went wrong, but I know that NaN stands for "Not a Number." (Like the function isNaN().)

Reply With Quote
  #4  
Old October 18th, 2000, 03:59 PM
Dogg Dogg is offline
Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2000
Posts: 9 Dogg User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
FYI: Use the parseInt() or parseFloat() functions to change the datatype to a number.

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignHTML Programming > Getting NaN -- What does this mean?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT