try attachEvent and detachEvent.............. Bertram.
-----Original Message----- From: [email protected] [mailto:[EMAIL PROTECTED] Behalf Of Ryan Meder Sent: 23 October 2006 02:41 To: [email protected] Subject: [CTJUG Forum] JS Document event listeners Hi, I have a javascript question: I am adding event listeners to events by making use of the following method. document.onclick = function (oEvent) { var o = document.getElementById("wpQuickEntryAdd"); if(o){ o.parentNode.removeChild(o); } } Whenever I click on the document this method is called. Which is correct. My problem is that I include many library's which contain the same method. what javascripts seems to do is overrright the the previous onclick event listener with the last one that is loaded. Does anybody know of a way to solve this. I think the anwers is on the lines that you must be able to add multiple event listeners on the document maby an array or somthing -- Regards, Ryan Meder This e-mail and any files transmitted with it are confidential and intended solely for the use of the individual or entity to which they are addressed. If you have received this e-mail in error please notify NSFAS immediately. Please note that any views or opinions presented in this e-mail are solely those of the author and do not necessarily represent those of the organisation. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CTJUG Forum" 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/CTJUG-Forum For the ctjug home page see http://www.ctjug.org.za -~----------~----~----~----~------~----~------~--~---
