Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Have a problem getting keypress to work

Status
Not open for further replies.

romh

Programmer
Jan 3, 2003
297
US
I have tried everything. I'm not a javascript expert by any means, but i was wondering if you guys could look at my code and tell me why the keypress isnt working. It works fine on Netscape and Firefox, but not on Internet Explorer. I am trying to fire the keypress event on an asp.net textbox. Thanks alot.

<html>
<body>
<head>
<title>CFS</title>


<script LANGUAGE = "javascript">

function tabber4()
{
var num =SSNa.value;
if((num.length)==SSNa.maxLength-1)
SSNb.focus();
}
</script>

</head>


<form runat="server">
<asp:Textbox id="SSNa" runat="server" maxlength="3" tabindex="7" onkeypress="return tabber4();" style="width:30"/> -
<asp:Textbox id="SSNb" runat="server" maxlength="2" tabindex="8" style="width:20"/> -

</form>
</body>
</html>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top