I have an input box that onpropertychange="validateEntryIE(this)"
validateEntryIE = function(object) {
$(object).val(validateEntry($(object).val()));
}
Which calls:
validateEntry = function(str) {
if( str != "" ) {
var regx = /[A-Za-z0-9_]/;
var str_new = "";
var chars = str.split('');
for(var i in chars) {
if (regx.test(chars[i])) {
str_new += chars[i];
}
}
return str_new;
}
}
However it does not replace the value and only returns a stack overflow. I am stuck beyond all belief. Does anyone know what has caused this and how to rectify