[dokuwiki] Re: JavaScript include conditionals

  • From: Andreas Gohr <andi@xxxxxxxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Sat, 20 Jan 2007 17:14:34 +0100

> In my tests I've attached the exection of the script with an event
> listener. But I still have some problems when the event listeners are
> attached before the js objects are loaded.

Event listeners need to be attached from the load event. Eg.

addInitEvent( function(){

  addEvent($('foo'),'click',function(){ alert('bar') });


This makes sure that the element with ID 'foo' is already loaded before
an click handler is attached to it.


DokuWiki mailing list - more info at

Other related posts: