Forum Moderators: open

Message Too Old, No Replies

Top Ten Javascript Annoyances

Usability and accessibility

         

rocknbil

9:49 pm on Dec 9, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I was going to put this in the JS forum, but it really is foo. :-)

In another forum people are going nuts over pop-ups. But there are far more insidious uses of JS that can annoy even the most complacent of users. I love Javascript, it's at least a third of what I do. But it's abuses are . . . rampant. The following is making us all look bad at the mere mention of it. Javascript rocks. Abuse of it doesn't.

1. Field Focus. I'm a busy guy. I'm always in a hurry, tacking away at this tab, while I wait for their dreadfully slow site to return a response, I'm in another. So I type my login in a half-loaded page, tab to the password field, begin typing and - WHAT? Why is it typing my pass in the user id field? Oh yeah. Some JS programmer thought it would be cool to use onLoad=focus and their page isn't keeping up with me . . . . ARG. Bank sites are the absolute WORST for this.

2. Javascript Dependence. Argue all you may, anything that depends on Javascript to work properly is a recipe for disaster.

3. Automatic pop-ups. This one's only #3 for me because the pop up blockers kill them. Not to be confused with what I consider "useful" popups - supplementary data that otherwise confuses the visitor and only opens when a link is followed. Beaten to death, let's move on.

4. Ajax. There. I've said it. I have absolutely hated every implementation I've seen of Ajax. The most outstanding example of abuse is eBay's "improved" auction interface. As a coder, I loved being able to code my own auctions. With Javascript on, their "rich text editor" removed all my carefully formatted code and white space, and made a total mess of it. eBay is now officially the only site I EXCLUSIVELY visit with Javascript OFF.

And guess what? When you do that, many of the "buttons", which should be submit buttons, fail, see #2.

5. Antiquated Menus. I suppose drop down menus have their place. But many of the ones I visit are still running the document.write() menus developed in 1995-ish. Slow and memory intensive.

6. WYSIWYG Javascript. I won't name names. But you probably all know who I'm talking about, the garbage that comes from a WYSIWYG editor and it's companion .SWF program makes me cringe. It even still contains NN-specific code. PuuuuleeeAAAAAse! People are paying serious money for these programs, pull it into the year 2K!

6. <a href="javascript:"></a> Javascript is not a URL/URI. Javascript is not a URL/URI. And if you didn't get it, Javascript is not a URL/URI. Often seen most with it's companion, "This site best viewed on the Boss's Brand of Browser at the Boss's Screen Resolution."

7. Inline Javascript. <a href="javascript:open('myurl.html','new window','width=2400,height=1800');">Click here</a>. On second thought, don't click here, it's probably not worth the effort. Corollary: javascript:void(0). Can't you just put a real URL in there? Or is it so important no one accesses your content unless they align with your view of How the Internet Should Work?

8. Anything that chases my mouse or scroll. Just because you're following me doesn't make me paranoid. It makes my "X" finger twitchy (read: CLOSE it!)

9. document.write() abuse. Best by example:

document.write('Here is some important content');
document.write('That everyone should see. It contains');
document.write('keywords vital to search engines.');

Why was this chosen over:

<p><a href="details.html" onClick="openDiv();">See details</a></p>
<p>Here is some important content That everyone should see. It contains keywords vital to search engines.</p>

.... where openDiv() reveals the above paragraph. (In reality, that bit of JS is an externally assigned behavior.)

10. Just because you can, doesn't mean you should.

onLoad="alert('Welcome to my site');"
onUnload="popupWindow('exit-poll.html');"
onLoad="refreshContent();" (this one strikes a particular nerve with me, I use the back button because I want to see the previous page without refreshing . . . )

</rant> :-)

What are yours?

[edited by: eelixduppy at 11:20 pm (utc) on Dec. 10, 2008]
[edit reason] disabled smileys [/edit]

janharders

10:06 pm on Dec 9, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



kind of adding to 6:
<a href="#" onclick="...">
That's even worse than the href="javascript:"-thingy, because usually, they tend to forget return values, thus clicking the link runs the js-function AND jumps to the top of the page. great idea to really annoy me on long pages with many links...

And another annoyance for me as a noscript-user: external javascript where it is not necessary.
Ebay, for example, on their my-page tells me to allow javascript or it won't work. Ok, I'm thinking, everything for ebay, there you go, temporary enabled. The page reloads, the "please activate javascript"-nagging is gone - still won't work, because they also include javascripts from another domain that belongs to ebay and is pretty obviously used to store static files. Not only do I have to allow javascript to that domain also (and another click gone), but they bring in a third domain. I don't understand the idea, a static.example.com would work just as well and wouldn't hassle me.
It's not only ebay that does this but some other large sites as well - must be in some "the ultimate guide to content delivery networks for corporate decision makers"-book :(

piatkow

5:22 pm on Dec 10, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Field focus keeps catching me out too. Clearly young programmers today never learned to touch type.