Advertisement

03.02.2008 at 06:18PM PST, ID: 23208313
[x]
Attachment Details

javascript -- NAN error when calculating a field that a 'null' value

Asked by amillyard in Microsoft Visual C#.Net, .NET Framework 2.0, Visual Studio 2008

Tags: c#, asp.net 2.x, visual studio 2008 pro, sql 2005 server, iis 6

using javascript -- I am getting a NAN error when calculating a field that a 'null' value

each time a relevant textbox field has had its value changed, the javascript fires up and tries to recalculate all the relevant value fields within the form.

the problem is that is a value is null -- then the NAN value appears in the results 'label' -- stops the calculation.

there are 2 options here I think to stop this :

1. somehow override the NAN status
2. prevent the textbox field to not have nothing entered (or deleted from it) -- as this calculation is performed each time the relevant textbox is updated, removing textbox content is reflected instantly (causing a NAN status) -- is there a javascript routine to prevent removing to no characters, and/or is so, then made the value be '0' -- so there is at least some value enter constantly in order for the NAN status to not appear.Start Free Trial
 
Loading Advertisement...
 
[+][-]03.02.2008 at 06:29PM PST, ID: 21028718

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.02.2008 at 06:55PM PST, ID: 21028804

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.02.2008 at 08:00PM PST, ID: 21028945

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Microsoft Visual C#.Net, .NET Framework 2.0, Visual Studio 2008
Tags: c#, asp.net 2.x, visual studio 2008 pro, sql 2005 server, iis 6
Sign Up Now!
Solution Provided By: gnoon
Participating Experts: 2
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628