![]() |
#1 |
Member
Join Date: Jul 2007
Home MUD: Lost Souls
Posts: 199
![]() |
![]() 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 on the . 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 |
Member
Join Date: Jan 2006
Location: Seoul
Home MUD: Tears of Polaris
Posts: 218
![]() |
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: 199
![]() |
![]() I'm delighted to hear you say it, because mine is designed specifically and painstakingly to never do that.
![]() |
![]() |
![]() |
![]() |
#4 |
Member
Join Date: Apr 2002
Location: United Socialist States of America
Home MUD: SmaugMuds.org
Home MUD: Arthmoor MUD Hosting
Posts: 249
![]() |
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: 199
![]() |
Re: Web Form Autofocus JavaScript
Sure. It's not that it's difficult, it's that it's unnecessary and therefore annoying. I'm the sort of person who thinks that the mouse is a highly overrated, clunky interface compared to keyboard control, anyway, and two seconds messing with a mouse compares very poorly, to my way of thinking, with a fraction of a second for a keypress.
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 |
Senior Member
Join Date: Oct 2002
Name: Chris
Location: Wolverhampton, UK
Posts: 358
![]() |
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: 199
![]() |
![]() Thanks! I'm glad someone liked it.
![]() |
![]() |
![]() |
![]() |
#8 |
Legend
Join Date: Aug 2007
Name: NewWorlds
Home MUD: New Worlds
Posts: 1,425
![]() ![]() |
Re: Web Form Autofocus JavaScript
I personally don't use forms, but thank you anyway for giving out this script for usage. It is a nice script and hard work. Kudos CP.
|
![]() |
![]() |
![]() |
#9 |
Member
Join Date: Jul 2007
Home MUD: Lost Souls
Posts: 199
![]() |
Re: Web Form Autofocus JavaScript
Aw, shucks. I appreciate the encouragement, even if you're not gonna use it.
![]() |
![]() |
![]() |
![]() |
#10 |
Member
|
Re: Web Form Autofocus JavaScript
I love when sites use this.
![]() |
![]() |
![]() |
![]() |
#11 |
Member
Join Date: Apr 2002
Location: United Socialist States of America
Home MUD: SmaugMuds.org
Home MUD: Arthmoor MUD Hosting
Posts: 249
![]() |
Re: Web Form Autofocus JavaScript
I think we both know I didn't mean 2 literal seconds. And personally I find the keyboard to be the most cumbersome pile of cow dung man ever attached to the computer. So I don't think too highly of ways to make the mouse less useful
![]() |
![]() |
![]() |
![]() |
#12 |
Member
Join Date: Jul 2007
Home MUD: Lost Souls
Posts: 199
![]() |
![]() Hunh. Takes all kinds, I guess. Never thought I'd hear that from a mudder.
! How ever does this thing make the mouse less useful? |
![]() |
![]() |
![]() |
#13 |
Member
Join Date: Jan 2006
Location: Seoul
Home MUD: Tears of Polaris
Posts: 218
![]() |
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: United Socialist States of America
Home MUD: SmaugMuds.org
Home MUD: Arthmoor MUD Hosting
Posts: 249
![]() |
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.
|
![]() |
![]() |
![]() |
Thread Tools | |
|
|