I'm trying to learn Javascript. Honestly, I don't know how you guys do it. Anyway, I wanted a little alert box to open when the url is loaded. So I tried a few permutations:

<script type="text/javscript">
window.onload=init;
function init(){
alert ("This boy is working");
document.Haskins.sku.focus();
}
</script>

or

<script type="text/javscript">
window.onload=function (){
alert ("This boy is working");
document.Haskins.sku.focus();
}
</script>

When I type document.Haskins.sku.focus() into the firebug console, it works, so I'm really at a loss here. If you have any suggestions, I'd appreciate it

p.s. I have onload="" in my body tag. I'm trying to migrate to a better implementation