There are a few ways of doing this but the best way I found was to use the push method of the _spBodyOnLoadFunctionNames array e.g.
function createprintpage(){
..
}
_spBodyOnLoadFunctionNames.push(“createprintpage”);
This array allows the addition of a function to the onload event without over-writing required functions by adding a javascript call directly to the master page body onload
February 6, 2009 at 10:57 pm
Great find Esther! Awesome, will have to give that a go as I’ll be tinkering with JQuery in coming weeks!
February 7, 2009 at 7:48 pm
[...] Adding Javascript Functions to a Master Page OnLoad Event « All the Goss about MOSS [...]