Focusing a form field at page load with MochiKit
Code snippets you find online will typically do something like:
<html> <head> ... </head> <body onload="document.someform.somefield.focus()"> ... </body> </html>
That’s nice and all, but this can be problematic when you have other onload methods for your body tag.
Here’s how I did it:
Pretty simple. This is only scratching the surface of MochiKit’s Signal handling.