The following script disables the tab key (and all other keys for that
matter) in Firefox, but doesn't disable the tab key in Opera 9.2 nor
in IE 6.0. Can someone explain to me how to write javascript that
would disable the tab key in all three browsers? Thanks in advance.
html>
<body>
<script type='text/javascript' src='MochiKit.js'>
</script>
<form name="TheForm">
<input type='text' name='text1'/>
<input type='text' name='text2'/>
</form>
</body>
<script type='text/javascript'>
function MisterKeyPress(e)
{
e.stop();
}
connect(self.document.TheForm.text1, 'onkeypress',
MisterKeyPress);
connect(self.document.TheForm.text2, 'onkeypress',
MisterKeyPress);
</script>
</html>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"MochiKit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/mochikit?hl=en
-~----------~----~----~----~------~----~------~--~---