Here's the current code
if (obj&&obj.tagName.toLowerCase()=="input") {
obj.filter=regex;
on(obj,"keypress",function(e) {
if (e.keyCode<32) return true;
if (!(String.fromCharCode(e.keyCode).match(this.filter))) {
e.stopPropagation(); e.preventDefault(); return false;
}
}
}
It seems to function just fine on Google Chrome but does not seem to work on Firefox. I have no real idea about tailoring javascript to the browser
Anyways I'm sure this is a 2 minute solution.
Thanks for the help.