List Info

Thread: Re: svn commit: r558075 - in /lenya/trunk/src/modules: editors/resources/javascript/ editors/resourc




Re: svn commit: r558075 - in /lenya/trunk/src/modules: editors/resources/javascript/ editors/resourc
country flaguser name
Germany
2007-07-24 14:59:27
On Jul 24, 2007, at 9:48 PM, Richard Frovarp wrote:

> Thomas Comiotto wrote:
>>> That one works now. Previously I was getting it
has no properties  
>>> or something like that and on an alert it came
back undefined. If  
>>> I do
document.getElementsByTagName('body')[0].onkeydown =  
>>> functionname, I can see it is registered using
Firebug. However,  
>>> having an alert/breakpoint for even entering
the function doesn't  
>>> trip.
>>>
>>
>> Windows fire key events, elements don't.
>>
>> -- 
>> Thomas
>
> Anyway to get around this?
>

No (and it even makes sense if you think about it - I didn't
follow  
this one from the beginning, what are you trying to
achieve?




>
------------------------------------------------------------
---------
> To unsubscribe, e-mail: dev-unsubscribelenya.apache.org
> For additional commands, e-mail: dev-helplenya.apache.org
>

------------------------------------------------------------
------------ 
-----
                         Thomas Comiotto              
thomas.comiottoid.uzh.ch

                         Universitaet Zuerich
                         Informatikdienste               
Tel: +41 44  
63 54541
                         Winterthurerstrasse 190            
  +41 44  
63 43333
                         CH-8057 Zuerich                 
Fax: +41 44  
63 54505





------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribelenya.apache.org
For additional commands, e-mail: dev-helplenya.apache.org


Re: svn commit: r558075 - in /lenya/trunk/src/modules: editors/resources/javascript/ editors/resourc
country flaguser name
United States
2007-07-24 15:04:29
Thomas Comiotto wrote:
>
> On Jul 24, 2007, at 9:48 PM, Richard Frovarp wrote:
>
>> Thomas Comiotto wrote:
>>>> That one works now. Previously I was
getting it has no properties 
>>>> or something like that and on an alert it
came back undefined. If I 
>>>> do
document.getElementsByTagName('body')[0].onkeydown = 
>>>> functionname, I can see it is registered
using Firebug. However, 
>>>> having an alert/breakpoint for even
entering the function doesn't 
>>>> trip.
>>>>
>>>
>>> Windows fire key events, elements don't.
>>>
>>> --Thomas
>>
>> Anyway to get around this?
>>
>
> No (and it even makes sense if you think about it - I didn't
follow 
> this one from the beginning, what are you trying to
achieve?
>

Trying to prevent the backspace key from causing the browser
to go back 
a page when editing, as this can cause a large number of
problems. My 
original code looked like this:

<script type="text/javascript" 
src="/modules/editors/javascript/disablebackspace.js&qu
ot;>&#160;</script>
<page:body onkeydown="return
checkBackspace(event)" onkeypress="return 
checkBackspace(event)" >

The goal is to move the code out of the body element so just
including 
the script would do all of the work. So I need a way of
registering 
those events/properties. But from what you're saying, that
can't be 
done. Unless I put the events on the window I guess.

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribelenya.apache.org
For additional commands, e-mail: dev-helplenya.apache.org


[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )