|
|||||||
This is a discussion on "Web Form Autofocus JavaScript" in the Top Mud Sites MUD and RPG Webmasters forum : In hopes of encouraging more webmasters to give their users input forms that automatically set input focus to a reasonable place, rather than requiring them to click on a box first, I have just released my Web form autofocus JavaScript code on the Lost Souls Grimoire. This is a reliable, cross-browser script that generally ought to be fire-and-forget; drop the .js file into your web site and add the line to invoke it to a relevant page, and it should always do something at least reasonable, and most often exactly what you'd want. With any luck, ... |
|
You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our MUD community today! If you have any problems with the registration process or your account login, please contact us. If you are a registered member of the old TMS forums, please click here
|
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 |
|
Member
Join Date: Jul 2007
Home MUD: Lost Souls
Posts: 107
![]() |
In hopes of encouraging more webmasters to give their users input forms that automatically set input focus to a reasonable place, rather than requiring them to click on a box first, I have just released my Web form autofocus JavaScript code on the Lost Souls Grimoire. This is a reliable, cross-browser script that generally ought to be fire-and-forget; drop the .js file into your web site and add the line to invoke it to a relevant page, and it should always do something at least reasonable, and most often exactly what you'd want. With any luck, publishing this code can help wipe out "oh, you have to CLICK on the username box first" forms.
![]() |
|
|
|
|
|
#2 |
|
Moderator
Join Date: Jan 2006
Location: Seoul
Posts: 192
![]() |
Re: Web Form Autofocus JavaScript
I hate those things... I'll have typed in my username and halfway into my password before the JavaScript fires... thereby putting the end of my password into the username box.
|
|
|
|
|
|
#3 | |
|
Member
Join Date: Jul 2007
Home MUD: Lost Souls
Posts: 107
![]() |
Quote:
Even mentions that in its descriptive comments. |
|
|
|
|
|
|
#4 |
|
Member
Join Date: Apr 2002
Location: California, USA
Home MUD: Alsherok
Posts: 169
![]() |
Re: Web Form Autofocus JavaScript
I guess I never thought of this as much of a problem. It takes all of 2 seconds to click into the box I want to type into.
Now, what I *DO* find annoying are boxes like the quickreply right here that won't let you start typing until you run off to find a button to click on to activate it. |
|
|
|
|
|
#5 | |
|
Member
Join Date: Jul 2007
Home MUD: Lost Souls
Posts: 107
![]() |
Re: Web Form Autofocus JavaScript
Quote:
I can understand why webmasters might say "oh, it's two seconds to click" and not want to mess with defining body onload tags or alterations to their forms and so on, especially when, as we've discussed, people often create new problems by trying to solve this one. Which is why I made a script that doesn't need you to mess with your body tag or your forms at all, generally automatically figuring out the most reasonable thing to do, and avoids the problems that less cautious implementations create. |
|
|
|
|
|
|
#6 |
|
Moderator
Join Date: Oct 2002
Name: Chris
Location: Wolverhampton, UK
Posts: 346
![]() |
Re: Web Form Autofocus JavaScript
H4X!
Seems a good idea to me. One of the principles they drilled into us when I was doing my HNC Computing in the Human-Computer Interface module was to ensure that forms, buttons, input boxes etc all had a logical tab index so you could quickly switch between them in a sensible order, and to ensure that any input form automatically started up in the first box you wanted filled in. Nice one chaos ![]() |
|
|
|
|
|
#7 |
|
Member
Join Date: Jul 2007
Home MUD: Lost Souls
Posts: 107
![]() |
|
|
|
|
|
|
#8 |
|
Senior Member
Join Date: Aug 2007
Name: NewWorlds
Home MUD: New Worlds
Posts: 365
![]() |
Re: Web Form Autofocus JavaScript
|
|
|
|
|
|
#9 |
|
Member
Join Date: Jul 2007
Home MUD: Lost Souls
Posts: 107
![]() |
Re: Web Form Autofocus JavaScript
|
|
|
|
|
|
#10 |
|
Member
|
Re: Web Form Autofocus JavaScript
I love when sites use this.
I know Gmail does. |
|
|
|
|
|
#11 | |
|
Member
Join Date: Apr 2002
Location: California, USA
Home MUD: Alsherok
Posts: 169
![]() |
Re: Web Form Autofocus JavaScript
Quote:
![]() |
|
|
|
|
|
|
#12 | ||
|
Member
Join Date: Jul 2007
Home MUD: Lost Souls
Posts: 107
![]() |
Quote:
Quote:
How ever does this thing make the mouse less useful? |
||
|
|
|
|
|
#13 |
|
Moderator
Join Date: Jan 2006
Location: Seoul
Posts: 192
![]() |
Re: Web Form Autofocus JavaScript
If it's smart enough to know I beat it to action and am already typing... give it to every website out there.
I personally hate anything that tries to take control from me like opening new windows(if I wanted a new window, I would have said open in a new window), changing focus in forms, or the most irritating... something that takes focus BACK to itself after it finished loading. I use lots of tabs, I often will click on new posts here, TMC, a few blogs I read, etc and then go back and start reading them. One site likes to grab focus back when it's done loading, which drives me crazy. |
|
|
|
|
|
#14 |
|
Member
Join Date: Apr 2002
Location: California, USA
Home MUD: Alsherok
Posts: 169
![]() |
Re: Web Form Autofocus JvaScript
That's why they call it irony. The keyboard is horribly slow for the job and fingers were not made for typing. If speech recognition were better and more support for it was widely available you'd see the death of keyboards. It would likely require retooling much of our software though and I don't really see developers wanting to put forth that kind of effort if it's perceived they won't even spend 5 minutes moving the cursor for someone.
|
|
|
|