Top Mud Sites Forum

Top Mud Sites Forum (http://www.topmudsites.com/forums/index.php)
-   MUD and RPG Webmasters (http://www.topmudsites.com/forums/forumdisplay.php?f=13)
-   -   Web Form Autofocus JavaScript (http://www.topmudsites.com/forums/showthread.php?t=4573)

chaosprime 09-24-2007 04:51 PM

Web Form Autofocus JavaScript
 
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. ;)

Baram 09-25-2007 04:54 AM

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.

chaosprime 09-25-2007 09:30 AM

Re: Web Form Autofocus JavaScript
 
I'm delighted to hear you say it, because mine is designed specifically and painstakingly to never do that. :) Even mentions that in its descriptive comments.

Samson 09-25-2007 12:04 PM

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.

chaosprime 09-25-2007 01:28 PM

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.

Xerihae 09-25-2007 01:50 PM

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 :)

chaosprime 09-25-2007 02:00 PM

Re: Web Form Autofocus JavaScript
 
Thanks! I'm glad someone liked it. :)

Newworlds 09-25-2007 02:10 PM

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.

chaosprime 09-25-2007 06:58 PM

Re: Web Form Autofocus JavaScript
 
Aw, shucks. I appreciate the encouragement, even if you're not gonna use it. :)

Zeno 09-25-2007 07:47 PM

Re: Web Form Autofocus JavaScript
 
I love when sites use this. :) I know Gmail does.

Samson 09-25-2007 10:26 PM

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 :)

chaosprime 09-25-2007 10:30 PM

Re: Web Form Autofocus JvaScript
 
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?

Baram 09-26-2007 03:12 AM

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.

Samson 09-26-2007 09:20 AM

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.


All times are GMT -4. The time now is 07:41 PM.

Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright Top Mud Sites.com 2022