Re: Order of focus for text entry inputs

From: Date: Fri, 14 Sep 2001 05:30:46 +0000
Subject: Re: Order of focus for text entry inputs
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-67309@lists.php.net to get a copy of this message
On Fri, 14 Sep 2001 14:53, Andrew V. Romero wrote: > I have a web page that is generated by a php script and on this page > there are several html text entry slots such as > echo "<b>Special Notes:</b><input name=\"specialNotes\" > size=\"65\"$prodNotes>"; > on one page. I fill in several of these input slots with default > values, but there are about 3-4 that require the user to manually type > an answer. I was wondering if there was a way to control which text > entry slots the cursor will go to when the user hits tab? Ideally I > would like the cursor to automatically move first to the three that > require the user to type something, and then move on to the slots that > already have a default value. Is this possible in php, I didn't see > any reference to giving items focus in the manual? If it is not > possible in php, is there some way that I can have this web page (that > is being generated by a php script) use javascript to create my desired > order of focus? In general I have not seen any javascript inside a php > script, although judging from a few other messages, this does seem to > be possible. > > Thanks for any ideas, > Andrew V. Romero That's a HTML thing. From Wilbur (about the INPUT tag) The ACCESSKEY and TABINDEX attributes apply to all input types except hidden. ACCESSKEY specifies a single Unicode character as a shortcut key for giving focus to the form control. Authors can set the access key on the INPUT element or the LABEL element associated with it. Entities (e.g. &eacute;) may be used as the ACCESSKEY value. The TABINDEX attribute specifies a number between 0 and 32767 to indicate the tabbing order of the element. A form control with TABINDEX=0 or no TABINDEX attribute will be visited after any elements with a positive TABINDEX. Among positive TABINDEX values, the lower number receives focus first. In the case of a tie, the element appearing first in the HTML document takes precedence. -- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA The world is so big and so global now.

« previous php.general (#67309) next »