Hi Rob,
You can put JavaScript just inline in the html, without it being tied to any event.
The "onload" technique makes it easier to add javascript to a page, without actually putting any javascript on the page, but it's not a requirement.
"unload" is obviously more of a requirement though since that presumably happens well after the page has been loaded.
so in your html, if you have code like this;
<script>
whatever();
</script>
then the whatever function is run.
You'll see that in a generated browse, for example, there's something like this;
<script type="text/javascript" defer="defer">var BrowseUserRights=new browseTable('BrowseUserRights','BrowseSystemFilter_frm','USS:Guid',1,'browseuserrights_browsesystem',1,1,1,'BrowseSystem','UpdateUserRights','_self',1,'Are you sure you want to delete this record?','4C7tZ4DeQ8VWyHEG','','_self','UpdateUserRights');
BrowseUserRights.setGreenBar('','','','');
BrowseUserRights.greenBar();
</script>
This code initialises the browse object, and runs the greenbar function if it's appropriate.
the "defer" attribute means that it waits for the page to finish loading before the code executes.
cheers
Bruce