XSLT server vs client side processing

Ovid on 2005-09-07T19:01:28

I couldn't figure out why my body tag's onload event wasn't firing. After a bit of playing with it, I realized it would fire if I processed the XSLT on the server and sent back HTML. If I process it on the client, it appears that the XML triggers the onload event so by the time the client transforms the XML to HTML, there's no onload event to fire. Yuck.


What if..

jk2addict on 2005-09-07T19:26:00

You have the client side transform the xml to xslt...when it does, have the xslt insert a script tag...

In that script tag...bind the onload even to your function...either inline to that tag, or in and external file vs src...
button.addEventListener('document.body', onload, true);
or
window.onload = extractBlockquoteCitations;

Re:What if..

jk2addict on 2005-09-07T19:27:23

Some more hints here on how to tackle adding events across browsers outside of the tags themselves...

http://www.sitepoint.com/print/structural-markup-javascript