Top Mud Sites Forum Return to TopMudSites.com
Go Back   Top Mud Sites Forum > Mud Development and Administration > MUD and RPG Webmasters
Click here to Register

Reply
 
Thread Tools
Old 09-24-2007, 04:51 PM   #1
chaosprime
Member
 
Join Date: Jul 2007
Home MUD: Lost Souls
Posts: 199
chaosprime will become famous soon enough
Lightbulb 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.
chaosprime is offline   Reply With Quote
Old 09-25-2007, 04:54 AM   #2
Baram
Member
 
Baram's Avatar
 
Join Date: Jan 2006
Location: Seoul
Home MUD: Tears of Polaris
Posts: 218
Baram is on a distinguished road
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.
Baram is offline   Reply With Quote
Old 09-25-2007, 09:30 AM   #3
chaosprime
Member
 
Join Date: Jul 2007
Home MUD: Lost Souls
Posts: 199
chaosprime will become famous soon enough
Smile 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.
chaosprime is offline   Reply With Quote
Old 09-25-2007, 12:04 PM   #4
Samson
Member
 
Join Date: Apr 2002
Location: United Socialist States of America
Home MUD: SmaugMuds.org
Home MUD: Arthmoor MUD Hosting
Posts: 249
Samson is on a distinguished road
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.
Samson is offline   Reply With Quote
Old 09-25-2007, 01:28 PM   #5
chaosprime
Member
 
Join Date: Jul 2007
Home MUD: Lost Souls
Posts: 199
chaosprime will become famous soon enough
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.
chaosprime is offline   Reply With Quote
Old 09-25-2007, 01:50 PM   #6
Xerihae
Senior Member
 
Xerihae's Avatar
 
Join Date: Oct 2002
Name: Chris
Location: Wolverhampton, UK
Posts: 358
Xerihae will become famous soon enough
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
Xerihae is offline   Reply With Quote
Old 09-25-2007, 02:00 PM   #7
chaosprime
Member
 
Join Date: Jul 2007
Home MUD: Lost Souls
Posts: 199
chaosprime will become famous soon enough
Talking Re: Web Form Autofocus JavaScript

Thanks! I'm glad someone liked it.
chaosprime is offline   Reply With Quote
Old 09-25-2007, 02:10 PM   #8
Newworlds
Legend
 
Join Date: Aug 2007
Name: NewWorlds
Home MUD: New Worlds
Posts: 1,425
Newworlds will become famous soon enoughNewworlds will become famous soon enough
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.
Newworlds is offline   Reply With Quote
Old 09-25-2007, 06:58 PM   #9
chaosprime
Member
 
Join Date: Jul 2007
Home MUD: Lost Souls
Posts: 199
chaosprime will become famous soon enough
Re: Web Form Autofocus JavaScript

Aw, shucks. I appreciate the encouragement, even if you're not gonna use it.
chaosprime is offline   Reply With Quote
Old 09-25-2007, 07:47 PM   #10
Zeno
Member
 
Join Date: Jan 2005
Location: Saratoga, NY
Home MUD: Bleached InuYasha Galaxy
Posts: 189
Zeno is on a distinguished road
Send a message via AIM to Zeno Send a message via MSN to Zeno Send a message via Yahoo to Zeno
Re: Web Form Autofocus JavaScript

I love when sites use this. I know Gmail does.
Zeno is offline   Reply With Quote
Old 09-25-2007, 10:26 PM   #11
Samson
Member
 
Join Date: Apr 2002
Location: United Socialist States of America
Home MUD: SmaugMuds.org
Home MUD: Arthmoor MUD Hosting
Posts: 249
Samson is on a distinguished road
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
Samson is offline   Reply With Quote
Old 09-25-2007, 10:30 PM   #12
chaosprime
Member
 
Join Date: Jul 2007
Home MUD: Lost Souls
Posts: 199
chaosprime will become famous soon enough
Exclamation 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?
chaosprime is offline   Reply With Quote
Old 09-26-2007, 03:12 AM   #13
Baram
Member
 
Baram's Avatar
 
Join Date: Jan 2006
Location: Seoul
Home MUD: Tears of Polaris
Posts: 218
Baram is on a distinguished road
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.
Baram is offline   Reply With Quote
Old 09-26-2007, 09:20 AM   #14
Samson
Member
 
Join Date: Apr 2002
Location: United Socialist States of America
Home MUD: SmaugMuds.org
Home MUD: Arthmoor MUD Hosting
Posts: 249
Samson is on a distinguished road
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.
Samson is offline   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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

All times are GMT -4. The time now is 09:42 AM.


Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Style based on a design by Essilor
Copyright Top Mud Sites.com 2022