Use jQuery -- it's a lot easier to find particular elements within the DOM.
http://api.jquery.com/focus/ On Friday, October 28, 2011 9:51:36 AM UTC-4, horridohobbyist wrote: > > Problem sol-ved... > > <script language="javascript"> > document.forms[0].elements[0].focus(); > </script> > > Richard > > On Oct 28, 7:13 am, horridohobbyist <horrido...@gmail.com> wrote: > > I've searched the archive and have found several solutions for > > specifying field focus using JavaScript, but they all seem to be out > > of date, ie, they don't work. What is the current accepted method of > > specifying field focus? I have a form with a text area field named > > "message". Something like: > > > > <script language="javascript"> > > document.form.message.focus() > > </script> > > > > ...should work. > > > > Thanks, > > Richard