I got around this problem using the Body onEvent JavaScript extension (de_addbodyjscript). I would still like to know how to add it from my extension as the plugin is not standalone without it. Cheers. //