Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Focus

Reply
Thread Tools

Focus

 
 
Leif K-Brooks
Guest
Posts: n/a
 
      02-12-2004
Paul Furman wrote:
> Leif K-Brooks wrote:
>
>>>> If I'm a keyboard user who doesn't wants to use something above that
>>>> box, I'll have to tab my way all the way up.

>
> What else would you want to do? alt keys still work for menu tasks.


Tab my way _down_ from the top of the page.

> I don't see the problem. The script loads when the page loads so when
> the page loads, your cursor is in the first box.


What if I had my cursor somewhere else before the page was fully loaded?

> I don't use tab on web pages unless I'm in a form, I
> see now that one tab takes me to the address bar, is this what you are
> talking about?


No, I'm talking about tabbing my way to links, form boxes, and
everything else focusable.

--
Proud "php freak that likes to stick to the rules". Actually, Python.
 
Reply With Quote
 
 
 
 
GD
Guest
Posts: n/a
 
      02-12-2004
Bruno <(E-Mail Removed)> wrote:
> I was aware of a javascript method, just wondered if it was
> possible in HTML.


Nope, HTML is just a markup language. It doesn't 'do' anything or
understand events, it just tells the browser what each piece of text is.
Given that all you're doing is focusing on a field when the page loads
it doesn't really matter if Javascript is enabled or not - It's not
going to break the page or affect accessibility when it doesn't work.

But, as you've seen in other replies, some people don't like things like
this

 
Reply With Quote
 
 
 
 
Paul Furman
Guest
Posts: n/a
 
      02-12-2004
OK I understand now that on a complex page with other links and
navigation, it will mess some people up (not many though <g>) but on a
simple form page, it makes sense to me and is what most people expect.

 
Reply With Quote
 
Michael Wilcox
Guest
Posts: n/a
 
      02-12-2004
Bruno <(E-Mail Removed)> wrote:
> How do you set the focus on a certain text field so that as soon as
> the page loads up that particular text input box is in focus?


As others have mentioned, it's entirely possible to do so in JavaScript (not
HTML) but I wouldn't recommend it. If I'm already typing in the box (or
another box) before the page finishes loading, my entered text will be
selected and overwritten without me knowing it, or my typing will end up in
the wrong box.
--
Michael Wilcox
mjwilco at yahoo dot com
Essential Tools for the Web Developer - http://mikewilcox.t35.com


 
Reply With Quote
 
Mark Parnell
Guest
Posts: n/a
 
      02-12-2004
On Thu, 12 Feb 2004 08:57:31 -0800, Paul Furman <(E-Mail Removed)>
declared in alt.html:
>
> <BODY onLoad="document.forms.mail.subject.focus()">
>
> It worked just fine, I guess it wouldn't if the visitor had java script
> turned off. Have I done something wrong? Any harm in this?


Yes. It won't happen until the page is finished loading, so if the user
is on a slow connection, or is a fast typist, they may have already
filled that field in, and be on to the next field.

This is especially a problem with login pages, when the user has already
entered their username, and is in the process of entering their
password, when suddenly the focus goes back to the username field.

--
Mark Parnell
http://www.clarkecomputers.com.au
 
Reply With Quote
 
Leif K-Brooks
Guest
Posts: n/a
 
      02-12-2004
Paul Furman wrote (talking about putting focus in a form element when
the page loads):
> OK I understand now that on a complex page with other links and
> navigation, it will mess some people up (not many though <g>) but on a
> simple form page, it makes sense to me and is what most people expect.


What if I'm already typing in another form box and then you suddenly
switch focus back to another?
 
Reply With Quote
 
Eric Bohlman
Guest
Posts: n/a
 
      02-13-2004
Paul Furman <(E-Mail Removed)> wrote in news:WAGdnbWU4oKPS7bdXTWc-
http://www.velocityreviews.com/forums/(E-Mail Removed):

> OK I understand now that on a complex page with other links and
> navigation, it will mess some people up (not many though <g>) but on a
> simple form page, it makes sense to me and is what most people expect.


A *really* simple form page. For example, Google's main search page has
only one input field, and the page isn't image-heavy. But consider a page
with a lot of fields and lots of images. The onLoad event doesn't happen
until the last image (or, if you've sold your soul to the devil, background
sound) has loaded. And that means that someone might well be in the middle
of filling out a form by the time the event occurs, at which point he'll
suddenly find himself overwriting something he typed before (especially if
the script doesn't just change the focus, but selects the content of the
field switched to, meaning that the first character typed will erase the
entire previous contents).
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
this.window.focus() vs. window.focus() vs. this.focus() Roger Javascript 3 03-08-2007 08:53 PM
Why "Focus and Recompose" causes back-focus issues Carl Miller Digital Photography 7 03-10-2005 12:14 PM
Fuji EXIF: Focus warning: "Out of focus" Hasan Diwan Digital Photography 3 12-26-2004 04:13 AM
Pan Focus vs Auto Focus JethroUK© Digital Photography 2 08-11-2004 06:26 PM
any manual focus cameras easy to focus? Catherine Jo Morgan Digital Photography 6 11-05-2003 06:36 PM



Advertisments