I am getting a value from a div & trying to compare with if condition but every-time execute in wrong way, Why ? please help me
example:W.r.t my code i got the totalcount value as 2, but again it is going into the if block , it should not go
My code:
var totalcount=$("#itemLocationGrid").jqGrid('getGridParam', 'records');//gives value 2
Number(totalcount);
if(totalcount===0);
{ //every time it executes. why?
alert("No item locations found to perform this ADD action.");
return false;
}
parseInt(0)does?parseIntis to parse a string into a number.0is already a number.ifstatement, even if it was onlytotalcount == 0would never hit?