Beau,
Your suggestion produced the following results.
- Firefox and IE 6.0 - all key presses seem to be DISabled
-Opera 9.2 - all key presses seem to be ENabled
So you seem to have discovered the secret for handling two of my three
browsers. But how do I disable the tab key in Opera 9.2?
This is interesting because my boss who is also our system architect
suggested to use Mochikit because a major design point is that you
don't really have to struggle very much with differences among the
many available browsers. But I can see that although this is a goal in
Mochikit, I can also see that it must be a constant uphill battle to
achieve this.
On May 8, 2:35 pm, Beau Hartshorne <[EMAIL PROTECTED]> wrote:
> On 8-May-07, at 11:47 AM, MikeC wrote:
>
>
>
>
>
> > 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>
>
> Have you tried 'onkeydown' instead of 'onkeypress'?
>
> Beau- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---