WebAIM - Web Accessibility In Mind

E-mail List Archives

RE: Setting focus in a php form


From: Moore, Michael
Date: Sep 14, 2006 8:10AM

Since you are using PHP, I will assume that you are adding the fields on
the server side. I would also write a new anchor and send the form back
to the url with the in-page anchor. This isn't perfect in IE and may
require a small hack but it will set the focus in the proper location.


-----Original Message-----
[mailto: <EMAIL REMOVED> ] On Behalf Of Erika Noll
Sent: Wednesday, September 13, 2006 11:42 AM
To: 'WebAIM Discussion List'; <EMAIL REMOVED>
Subject: [WebAIM] Setting focus in a php form

We're working on a project where we have a php form that displays new
fields after it makes a call to the database to determine what options
will be available based on user decisions previously in the form. I'm
trying to figure out a good way to reset the focus to the next section
of the form after each action. Does anybody know a good way to do this?
Right now, the page scrolls, but it's not really resetting the focus
(although visually it might seem like it does). It's a hack, and I'd
like a cleaner and more accessible solution.


Erika Noll Webb, Ph.D.
Partner, Quintus Design

5370 Manhattan Circle Suite 105
Boulder CO 80303
o) 303.449.5020
m) 720.319.2145
f) 303.449.7045
IM erikanollwebb

Address list
messages to <EMAIL REMOVED>