Is there any reason you you can't use a simple SSI (Server Side Include) file?
Sorry, no JS knowledge here, but I would think you need a trigger of some sort like body onload
yeah, I actually tried that in an earlier version of the code. That has to be correct but I still cannot get it to work...
sooner or later I'll figure it out...