What i need is something as such (based on previous thread): I have a textfield and i want to limit the input to only numbers, letters and caps.
So the code is:
<input onkeydown="return testChars(event)" type="text" .../>
function testChars(e)
{

var keyCode = e.keyCode;

if(e.shiftKey && keyCode==53){
return false;
} //block "%"
//HERE BLOCK EVERYTHING THATS NOT a Letter, caps and numbers

if ( (keyCode > 64 && keyCode < 91) ||(keyCode > 96 && keyCode < 123) )//Letters and Caps
{
return true;
}
else if ( keyCode > 47 && keyCode < 58 )//numbers
{
return true;
}


}

The problem however using the onkeydown is that i would need to cater for every single possibility of them using SHIFT+1=*, SHIFT+2, SHIFT+3 etc. which would take forever. And i cant block Shift because they might use it for Capitalising letters.
What is the best way to do this, im abit puzzled here...