i have a function to validate (accept only integer and float)
function isNumeric(prodFilterValue)
{
if((parseFloat(prodFilterValue) == parseInt(prodFilterValue)) && !isNaN(prodFilterValue))
{
alert('numeric');
alert('hahahahhahaha');
$("#valuetxt1").css('background-color', 'white');
}
else
{
alert('HIIIIIIIIIII');
$("#valuetxt1").css('background-color', 'grey');
}
return prodFilterValue;
}
the problem now is.. when validate 0.1 it will say it is not numeric.. suppose to be it is numeric.. when i put another condition
if((parseFloat(prodFilterValue) == parseInt(prodFilterValue)) && !isNaN(prodFilterValue) || (prodFilterValue % 1 !=0))
it will validate 1A as numeric