Hi,
I need a simple Javascript function that will call another function that checks the key entered by a user in a textbox and if it is valid displays it in the textbox with other valid letters previously entered. When the user has entered 3 valid characters I want to call another function.
The setup I had was this:
In an xsl stylesheet:
onkeypress - return checkcharacterEntered(even
t ,this)
-----------------------
checkcharacterEntered( event e, textbox t){
var result= validCharacter(e,t);
if ( document textbox.value.length==3){
call another method
}
return result;
}
This setup works fine for mozilla Firefox but for Internet Explorer the length of textbox.value.length does not seem to get updated until checkCharacterEntered has returned its value.
So when the user enters a third valid character the value of textbox.value.kength is 2 and not 3. Any ideas on how to get around this problem. Thanks.
Start Free Trial