The Design of Software (CLOSED)

A public forum for discussing the design of software, from the user interface to the code architecture. Now closed.

The "Design of Software" discussion group has been merged with the main Joel on Software discussion group.

The archives will remain online indefinitely.

A plague on onload+setfocus

Just a quick rant to say how annoying I find all the sites that use the onload event to set the field focus for a login page. (And yes I am guilty of writing one or two myself).

By the time they finish loading all the adverts and other graphics Im already typing my password and it switches focus back to the id field so I end up submitting my id and password as cleartext concatenated together which then comes back in a hugely sized error message that everyone within 100 feet of my cube can see telling me there is no such user as mynamePa55word and would I like to create such an account.

Moral of the story? When you code a site dont just test it on localhost. You need to test how useable it is with some network delay too.
Java GUI Programmer
Sunday, May 14, 2006
It happens for me on Yahoo sometimes.
Sunday, May 14, 2006
Heh, it was having Yahoo do it to me for the umpteenth time this week that inspired that rant in the first place!
Java GUI Programmer
Sunday, May 14, 2006
several banking websites i use do this

i have complained them several times, maybe they could test for onload and field value = empty

but they all says thats the way we intended the page to work, you need to wait until it has finished loading.

another one they do is auto tab to the next field when the first field is full, so i type the first few charges hit tab and end up 2 boxes away from where i was expecting to be and starting type the number in that box
bumperbox Send private email
Sunday, May 14, 2006
You know, a change of the error message would also solve this...

If it simply said "no user with that username/password combination was found", then voila.
KC Send private email
Sunday, May 14, 2006
Indeed. Displaying user input in an error message many times will indicate the possibility of a cross-site scripting exploit. After all, you could just as easily type in valid Javascript as your username. Sites that do this need to be very careful about how they display that error message.
Monday, May 15, 2006
Maybe there's a better way to do it, but I get irritated with pages that DON'T set the cursor to the first input field.  Typically my hand is on the keyboard after having entered the URL and I don't want to have to then mouse to a field and click it so I can continue typing.  I guess we all have our own nits to pick.
anon :)
Monday, May 15, 2006
John Topley Send private email
Monday, May 15, 2006
Problem has been solved by The Man in Blue.
JD Send private email
Monday, May 15, 2006
John beat me to it!
JD Send private email
Monday, May 15, 2006
Why all the hassle over something that can be made so simple or am I missing something?

<input name="first_input">
<script language="Javascript" type="text/javascript">

This (should) simply focus the first input immediately when it is loaded. The rest of the page can go on loading and the user's progress should not be interfered with.
Chris Lee Send private email
Monday, May 15, 2006
This could be considered a browser deficiency as well.

The browser ought to ignore a refocus request if the user has manually refocused since the page has started loading.
David Jones Send private email
Wednesday, May 17, 2006
Thanks for the link John & JD! Id not seen that site before and I reckon Ill be spending a fair bit of time reading the articles there.
Java GUI Programmer
Friday, May 19, 2006

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
Powered by FogBugz