[mochikit] Re: incorrect binding with connect

2007-05-08 Thread Bob Ippolito

On 5/2/07, Tim Stebbing <[EMAIL PROTECTED]> wrote:
>
> please see minimal non working example at http://www.pomke.com/mochifail.html
>
> The handler method is bound using bindMethods(this); when passed to
> connect it is rebound

r1287 should fix this.

-bob

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"MochiKit" group.
To post to this group, send email to mochikit@googlegroups.com
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
-~--~~~~--~~--~--~---



[mochikit] Re: Disabling the tab Key

2007-05-08 Thread Beau Hartshorne

On 8-May-07, at 3:15 PM, MikeC wrote:

> 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.

In general, use 'onkeypress' handlers for keys that generate visible  
characters, and 'onkeydown' handlers for  invisible characters.

I don't know why Opera won't let you disable the tab key. It'll take  
some trial and error to figure it out. (Have you tried listening on  
window or document instead of on the form field? Have you tried doing  
something like ?)  
Please let us know what you discover.

Thanks,
Beau


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"MochiKit" group.
To post to this group, send email to mochikit@googlegroups.com
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
-~--~~~~--~~--~--~---



[mochikit] Re: Disabling the tab Key

2007-05-08 Thread MikeC

Bob,

I thought I replied to this, but I can't see my reply, so here goes.
The results are the same whether I put the script tag inside or
outside of the body. I don't think it matters.

On May 8, 12:19 pm, "Bob Ippolito" <[EMAIL PROTECTED]> wrote:
> On 5/8/07, MikeC <[EMAIL PROTECTED]> 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>
> > 
>
> > 
> > 
>
> > 
> > 
> > 
> > 
>
> > 
>
> > 
> > function MisterKeyPress(e)
> > {
> > e.stop();
> > }
> > connect(self.document.TheForm.text1,  'onkeypress',
> > MisterKeyPress);
> > connect(self.document.TheForm.text2,  'onkeypress',
> > MisterKeyPress);
> > 
>
> > 
>
> Is it even valid to stick a script tag outside of the body like that?
> I've only seen script tags inside  and inside .
>
> -bob- 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 mochikit@googlegroups.com
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
-~--~~~~--~~--~--~---



[mochikit] Re: Disabling the tab Key

2007-05-08 Thread MikeC

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>
> > 
>
> > 
> > 
>
> > 
> >
> >
> > 
>
> > 
>
> > 
> >function MisterKeyPress(e)
> >{
> >e.stop();
> >}
> >connect(self.document.TheForm.text1,  'onkeypress',
> > MisterKeyPress);
> >connect(self.document.TheForm.text2,  'onkeypress',
> > MisterKeyPress);
> > 
>
> > 
>
> 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 mochikit@googlegroups.com
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
-~--~~~~--~~--~--~---



[mochikit] Re: Disabling the tab Key

2007-05-08 Thread Beau Hartshorne

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>
> 
>
> 
> 
>
> 
>   
>   
> 
>
> 
>
> 
>   function MisterKeyPress(e)
>   {
>   e.stop();
>   }
>   connect(self.document.TheForm.text1,  'onkeypress',
> MisterKeyPress);
>   connect(self.document.TheForm.text2,  'onkeypress',
> MisterKeyPress);
> 
>
> 

Have you tried 'onkeydown' instead of 'onkeypress'?

Beau


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"MochiKit" group.
To post to this group, send email to mochikit@googlegroups.com
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
-~--~~~~--~~--~--~---



[mochikit] Re: Disabling the tab Key

2007-05-08 Thread Bob Ippolito

On 5/8/07, MikeC <[EMAIL PROTECTED]> 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>
> 
>
> 
> 
>
> 
> 
> 
> 
>
> 
>
> 
> function MisterKeyPress(e)
> {
> e.stop();
> }
> connect(self.document.TheForm.text1,  'onkeypress',
> MisterKeyPress);
> connect(self.document.TheForm.text2,  'onkeypress',
> MisterKeyPress);
> 
>
> 

Is it even valid to stick a script tag outside of the body like that?
I've only seen script tags inside  and inside .

-bob

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"MochiKit" group.
To post to this group, send email to mochikit@googlegroups.com
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
-~--~~~~--~~--~--~---



[mochikit] Disabling the tab Key

2007-05-08 Thread MikeC

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>













function MisterKeyPress(e)
{
e.stop();
}
connect(self.document.TheForm.text1,  'onkeypress',
MisterKeyPress);
connect(self.document.TheForm.text2,  'onkeypress',
MisterKeyPress);





--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"MochiKit" group.
To post to this group, send email to mochikit@googlegroups.com
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
-~--~~~~--~~--~--~---