It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming JavaScript Forum

A query about NAN() method of javascript

A query about NAN() method of javascript

Postby amritpalpathak on Thu Oct 13, 2011 4:25 pm

I am using NAN() method to test whether a user is entering a numeric value of not.It is working fine when a user is not entering a numeric value.Suppose he/she enter "abc" instead of a numeric value then it is showing a error message but he/she change the value to a numeric number still it is giving a same error message even after refreshing a page.
What could be the error?
How to fix it?

Below is the code.


<script type="text/javascript" >
function validate()
{
var tos=document.getElementById('tos').value;
var df=document.getElementById('df').value;
if(df=="")
{
alert("Please enter the value of Df");
return false;
}
if (isNaN(df.value))
{
alert('Please enter a numberic value of Df');
return false;
}
}
</script>


Thanks in advance


URL: http://able2know.org/topic/178565-1
amritpalpathak
 
Posts: 2
Joined: Sat Oct 09, 2010 3:18 pm

Who is online

Users browsing this forum: No registered users and 5 guests