Move Cursor To Form Field

Rrrrg.  There is nothing more annoying than having to leave the keyboard and click into a form field before being able to enter any text into it.  Below is the javascript method to pre focus the cursor on a form field.  ( I don’t do it on the search field on this page because a) the search is rarely used upon arriving here and b) focusing at that field moves the top of this page out of view.

In <head> </head> section:
<SCRIPT TYPE=”TEXT/JAVASCRIPT”>
<!–
function focus(){document.FORM_NAME.FIELD_NAME.focus();}
// –>
</SCRIPT>

In <body> tag:  <body onLoad=focus() >

1 comment to Move Cursor To Form Field

Leave a Reply

 

 

 

*


Warning: Illegal string offset 'solo_subscribe' in /home/mmond/sites/markpreynolds/wp-content/plugins/subscribe-to-comments/subscribe-to-comments.php on line 304

Subscribe without commenting