Question Boy wrote:
[...]
I get you don't like the js, do you have any alternatives to recommend?
Not bad, but a little off. It's not that I don't like the JS. It's
that the JS is so monstrously inept that nobody in their right mind
should want to use it. Of course, that describes 99.9% of the JS on the
Web. If you don't believe that, turn on error reporting in IE (or
Opera) and browse around for a bit.
Using Opera 10.5 (which is likely younger than most of the scripts it
encounters), it becomes quite evident that even "major" sites rely on
scripts that were written by observing the browsers that were out at the
time (a strategy that is the kiss of death in cross-browser scripting).
Google Groups (on discarding a reply):-
Uncaught exception: TypeError: Cannot convert 'this.Ua' to object
Error thrown at line 262, column 832 in <anonymous function: lc>() in
http://groups.google.com/groups/static/g2_email_autocomplete.js:
for(var a=0;this.Ua[a];++a)
called from line 110, column 103 in <anonymous function: handleEvent>(a)
in
http://groups.google.com/groups/static/g2_email_autocomplete.js:
return this.listener[EAC_Q](this.handler||this.src,a);
called via Function.prototype.call() from line 126, column 612 in
<anonymous function: EAC_.events.fireListener>(a, b) in
http://groups.google.com/groups/static/g2_email_autocomplete.js:
b=a[EAC_2a](b);
called from line 130, column 368 in <anonymous function:
EAC_.events.lb>(a, b) in
http://groups.google.com/groups/static/g2_email_autocomplete.js:
e=EAC_.events.fireListener(a,f)
called from line 111, column 176 in <anonymous function>(n) in
http://groups.google.com/groups/static/g2_email_autocomplete.js:
return g[EAC_Q](l.src,l.key,n)
The first line indicates that the script is a lost cause. It's trying
to sniff the browser (and failing miserably). Had it "succeeded", it
would still have lost as the UA string is not an indicator of browser
features. If all they had to observe at the time was Opera 9...
MSDN:-
Opera has modified the JavaScript on msdn.microsoft.com (MSDN menus are
invisible, should appear). See browser.js for details
That's an interesting warning. Apparently Opera is getting proactive
about the incompetent developer problem. There's only so much they can
do though. The incompetence out there is overwhelming (even a behemoth
like MS can't find good help).
GMail:-
Opera has modified the JavaScript on mail.google.com (GMail deletes
messages on End key presses). See browser.js for details
Deletes messages on End key presses? *Shudder*
And the Dojo people regularly cite Gmail as being on the vanguard of
"major" web apps. How much worse can you get when the browser
developers are forced to keep a database of lousy scripts?
CNN:-
Uncaught exception: TypeError: 'exitChecker.close' is not a function
Error thrown at line 1, column 21029 in <anonymous function:
InsightExpress.PopUpInvite.prototype.Show>(second) in
http://core.insightexpressai.com/ad...com&placementID=223658296&creativeID=36384403:
exitChecker.close();
called from line 1, column 42807 in <anonymous function:
InsightExpress.onload>() in
http://core.insightexpressai.com/ad...com&placementID=223658296&creativeID=36384403:
invite.Show();
called from line 1, column 2452 in <anonymous function:
InsightExpress.OnLoad>() in
http://core.insightexpressai.com/ad...com&placementID=223658296&creativeID=36384403:
InsightExpress.onload();
called from line 1, column 3266 in <anonymous function:
InsightExpress.ready>() in
http://core.insightexpressai.com/ad...com&placementID=223658296&creativeID=36384403:
InsightExpress.OnLoad();
called from line 1, column 4137 in <anonymous function>() in
http://core.insightexpressai.com/ad...com&placementID=223658296&creativeID=36384403:
InsightExpress.ready();
Cleanup in aisle #21029.

Pop-up blocked too. Idiots.
Yahoo:-
Opera has modified the JavaScript on
www.yahoo.com (Yahoo ISP portal
blocks Opera users). See browser.js for details
JavaScript
User Javascript thread
Opera has modified the JavaScript on
www.yahoo.com (Yahoo!). See
browser.js for details
JavaScript
User Javascript thread
Opera has modified the JavaScript on
www.yahoo.com (Yahoo!). See
browser.js for details
JavaScript
User Javascript thread
Opera has modified the JavaScript on
www.yahoo.com (Yahoo ISP portal
blocks Opera users). See browser.js for details
JavaScript
User Javascript thread
Opera has modified the JavaScript on
www.yahoo.com (Yahoo!). See
browser.js for details
They are keeping an eye on the majors it seems. Won't help everyone
else though. Of course, it isn't really helping the affected sites
either as now when they fix the problems, they may break Opera's
improvised workarounds. It's really getting ridiculous, isn't it? This
is the future of application development? It's clearly already sunk
under its own weight.
NBC:-
Inline script compilation
Syntax error at line 2 while loading:
sc'+'ript language='JavaScript1.1' src="
--------------------^
expected ')', got 'JavaScript1'
Mind-boggling. These aren't obscure miscues deep in some huge
experimental Web app. These are simple documents with simple (yet often
huge) scripts that somehow managed to make it into production with very
obvious errors that show themselves immediately on load. How do you
miss those? My theory is that they don't miss them, but dismiss them as
"just one of those things". Cross-browser scripting is impossible after
all, even when the focus is narrowed to three or four browsers.
Of course, they don't all throw exceptions. Some simply fail to
function (e.g. Dojo's jQuery-powered forums, which makes the stop/reload
button flash like a strobe light). And speaking of Dojo, I recently
tried out some of their demos, which presumably represent them putting
their best foot forward, and effortlessly triggered exceptions all over
the place. Twitter comes to mind as well. I often see "undefined" show
up on the page in odd places and have to confirm deleted Tweets twice
(after which it usually informs that "something went wrong" and I should
try again, despite the fact that they removed the entry from the DOM).
And some minors, starting with the Dojo "foundation", which is surely
the archetypal bad "Web 2.0" site. The content is unreadable if your
screen resolution is less than whatever the QA testers used (assuming
anyone tested it at all).
http://dojofoundation.org
Uncaught exception: [object DOMException]
Error thrown at line 20, column 7387 in <anonymous function:
dojo.loaded>() in
http://o.aolcdn.com/dojo/1.1.1/dojo/dojo.xd.js:
throw e;
called from line 1, column 0 in program code:
dojo.loaded();
My host's Webmail (a YUI abomination called "Zimbra"):-
JavaScript -
https://mail6d.brinkster.com/zimbra/yui/2.5.1/button/button-beta-min.js
Linked script not loaded
Not an exception of course, but illustrates how sloppy the developers
were/are (this same stupid message has been popping up forever). Wonder
if they needed that button for something? When I browse the Web, I
don't want a scary adventure. I'd turn scripting off completely if only
developers were competent enough to let me do that without penalty.
Every single exception indicates a script that has gone off the path
into weeds never envisioned by the developers. Software like that is
worse than useless (i.e. the sites would have been better off without it).
As for freely available sortable table alternatives. I don't know.
Somebody else might be able to suggest one though. Stay tuned.