Fix to support any languages
|
|
Hi, Nice idea but work only on english server :o( Use function bellow to extract number from string ;o)
function getIntValue(str, defaultValue) {
var temp = ""+str;
temp = temp.replace(/[^-0-9]+/g, "");
temp = parseInt(temp);
if (defaultValue != undefined && (temp == undefined || (""+temp == "NaN"))) {
return defaultValue;
}
return temp;
}
|
|
|
Thx, I haven't even thought about that. However, I will fix that using your function. Thanks again. |