W3C home > Mailing lists > Public > www-talk@w3.org > May to June 2000

Re: CURSOR positioning????? (from mainframer)

From: Clover Andrew <aclover@1VALUE.com>
Date: Mon, 15 May 2000 10:39:14 +0200
Message-ID: <5F78AA062F6AD311A59000508B4AAF6D092B23@pcs02>
To: "'Randy Abner'" <randy.abner@mail.state.ar.us>, "'www-talk@w3.org'" <www-talk@w3.org>
Randy Abner <randy.abner@mail.state.ar.us> pondered:

> I am needing to position the cursor on the first input field 
> when my FORM is first displayed - without the user having to
> point-click to it. I can't find a HTML keyword that
> corresponds to this command.  

Nope. Because it is a command, and not really markup, you'll
want to look at a client-side scripting solution. The quick
'n' dirty JavaScript answer would be:

  <body onload="document.forms['x'].elements['y'].focus();">

where x and y are the names of the form and input field in
question.

hth

-- 
Andrew Clover
Technical Support
1VALUE.com AG
Received on Monday, 15 May 2000 04:42:37 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 27 October 2010 18:14:24 GMT