in reply to CGI combining javascript

what about calling the javascript function from an onload event? window.onload or an onload event set in the <body> tag.