Hii crmpicco!!!
In my case i use Number
since
parseFloat ->First character can be("." ,"+","-")or any number(0-9)
If it finds a character other than these (say at point p),it ignores that character and all succeeding characters and return the value up to that point P.
so whenever any non numeric number (say a,~,;) found in the parameter value it discarded from that location
e.g
a="-23.,34g" //or when form field contains (-23.,34g) as a input value
parseFloat(a) will return -23
a="2w3.34g" will return only 2
a="23g23" will give only 23
The same thing with parseInt
if first argument is started with "0x" it assumes it's a
hexadecimal value.
if started with 0 - not followed by an "x" - assumes as a octal value
so to avoid these problems use parseInt(string [,radix])
Hope this will help you
Cheers :)
vinod
|