Richard Frovarp wrote:
> Markus Angst wrote:
>> 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...
>>   
> 
> I'm trying to learn how to use that. The code is being called during the 
> onload event. Wouldn't that be the proper time?

Yes, this should be ok, see
http://developer.mozilla.org/en/docs/DOM:window.onload, where it says: "The load
event fires at the end of the document loading process. At this point, all of
the objects in the document are in the DOM, and all the images and sub-frames
have finished loading."

Markus Angst

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to