I'm trying to unobtrusively attach an onchange event to a select box on my CMS page. I've figured out that i can add custom script to a specific module using the augmentInit() function off the DataObjectDecorator.
What's confusing to me is that the window.onload() event seems to fire when the silverstripe logo comes up, which is before my select box is loaded into the DOM.
Anyone know how this is usually done?