Cause a field to be auto-focused when the page is done loading
So, wouldn’t it be user friendly, if when you went to a form page in a document, if the cursor was automagically positioned at the first field in the form?
Why, yes it would. Try:
Event.observe(window, 'load', function(){
try {
$('eventName').focus();
}
catch (e) {}
});
after your </form> tag. This requires the prototype javascript library