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
user name
2007-07-24 14:04:45
Richard Frovarp wrote:
>> See http://www.scottandrew.com/weblog/articles/cbs-events.
This 
>> approach has
>> worked for us for years.
>>
>> Hope this helps.
>> Markus Angst
>>   
> Okay, I was able to do this under Firefox:
> 
>
window.addEventListener('load',LenyaDisableBackspace,fa

lse);

which won't work in IE iiuc.

> After changing the jx to do the same to load FCKeditor,
that worked. But 
> I can't get anything to work to register the events on
the body. Whether 
> it be body.addEventListener, or body.onkeypress, they
just don't work. 
> The only thing I've got to work so far is
document.onkeypress. Perhaps 
> I'm not getting the correct node to add my listeners
to.

strange.

> I've tried:
> document.body
> document.getElementsByTag('body')
> document.getElementsByTag('body')[0]

i think it should be
document.getElementsByTagName('body')[0]. what does 
the javascript error console in firefox say?



-- 
Jörn Nettingsmeier

Kurt is up in heaven now.


------------------------------------------------------------
---------
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
user name
2007-07-24 14:18:06
Jörn Nettingsmeier wrote:
> Richard Frovarp wrote:
>>> See http://www.scottandrew.com/weblog/articles/cbs-events.
This 
>>> approach has
>>> worked for us for years.
>>>
>>> Hope this helps.
>>> Markus Angst
>>>   
>> Okay, I was able to do this under Firefox:
>>
>>
window.addEventListener('load',LenyaDisableBackspace,fa
> 
> lse);
> 
> which won't work in IE iiuc.
> 
>> After changing the jx to do the same to load
FCKeditor, that worked. But 
>> I can't get anything to work to register the events
on the body. Whether 
>> it be body.addEventListener, or body.onkeypress,
they just don't work. 
>> The only thing I've got to work so far is
document.onkeypress. Perhaps 
>> I'm not getting the correct node to add my
listeners to.
> 
> strange.
> 
>> I've tried:
>> document.body
>> document.getElementsByTag('body')
>> document.getElementsByTag('body')[0]
> 
> i think it should be
document.getElementsByTagName('body')[0]. what does 
> the javascript error console in firefox say?

Maybe you try to do this at a point in time where the body
element doesn't exist
yet?

Firebug is also a good tool to debug such stuff...

Regards,
Markus Angst

------------------------------------------------------------
---------
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 14:20:07
Jörn Nettingsmeier wrote:
> Richard Frovarp wrote:
>>> See http://www.scottandrew.com/weblog/articles/cbs-events.
This 
>>> approach has
>>> worked for us for years.
>>>
>>> Hope this helps.
>>> Markus Angst
>>>   
>> Okay, I was able to do this under Firefox:
>>
>>
window.addEventListener('load',LenyaDisableBackspace,false);

>
> which won't work in IE iiuc.

Right, but there is an alternate method. It is supposed to
work in IE 
6.0+. I'll give that a try once I get FF working.

>
>> After changing the jx to do the same to load
FCKeditor, that worked. 
>> But I can't get anything to work to register the
events on the body. 
>> Whether it be body.addEventListener, or
body.onkeypress, they just 
>> don't work. The only thing I've got to work so far
is 
>> document.onkeypress. Perhaps I'm not getting the
correct node to add 
>> my listeners to.
>
> strange.
>
>> I've tried:
>> document.body
>> document.getElementsByTag('body')
>> document.getElementsByTag('body')[0]
>
> i think it should be
document.getElementsByTagName('body')[0]. what 
> does the javascript error console in firefox say?
>
>
>
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.

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


[1-3]

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