C
CreativeMind
hi all,
i m using this function in javascript but there is problem.
function thousandseparator(val)
{
var regexpr=new RegExp('(-?[0-9]+)([0-9]{3})');
while(regexpr.test(val))
{
val=val.replace(regexpr,'$1,$2');
}
return val;
}
but it sometimes gives output as 1,2,345 while i use onblur and alert.
how can i resolve it?
how i change the string 123,456 into number 123456??
thx
i m using this function in javascript but there is problem.
function thousandseparator(val)
{
var regexpr=new RegExp('(-?[0-9]+)([0-9]{3})');
while(regexpr.test(val))
{
val=val.replace(regexpr,'$1,$2');
}
return val;
}
but it sometimes gives output as 1,2,345 while i use onblur and alert.
how can i resolve it?
how i change the string 123,456 into number 123456??
thx