Let's make HTML/JavaScript suck less

I booked a train reservation at Amtrak.com last night. Things could have gone better. First time through the order form, after filling in all the particulars, I had to stop and think when confronted with: Click here for important ticket pick-up information. It was a javascript: link. (Click it to see the function it invoked.) My thought process was literally: "Do I gamble, follow this link, and possibly blow my context, or do I play it safe but remain ignorant of the 'important ticket pick-up information'"? So of course, I gambled and lost. Second time through, after filling in all the particulars again, I again lost context -- albeit only partially -- when the system punished me for including spaces in the credit-card number. Maybe I should have just called Julie, although she has her own set of issues.

I can't see any reason why that JavaScript function should have hung IE6. So we can blame the first glitch on Microsoft. But then again, why was JavaScript needed here? The generated JSP page has all of the information it needs to form an ordinary link targeting a new information page. The use of JavaScript is gratuitous here, and Murphy's law says that any gratuitous use of technology courts trouble.

My post-mortem also showed me that the credit-card field's small print did, indeed, proclaim: (Do not include dashes or spaces). So we can blame the second glitch on me. But come on. There are regular expression libraries for Java. Rather then apply the one-line regex search/replace that would smooth over this situation, you'd rather punish the harried business traveler who didn't read and obey the small print?

There are lots of reasons to question the browser's ability to deliver an effective interface to business processes. Macromedia's poster child, The Broadmoor, makes a compelling case for the Flash MX alternative. There are a half-dozen other client-side technologies now jockeying for position, based on various permutations of DHTML, XML, Java, and .NET. These are all worthy initiatives that promise to transform the client-side experience. But can't we, at the same time, improve the HTML/JavaScript presentation logic that's out there now, and will be with us for a very long time? A lot of this stuff is much worse than it needs to be.


Former URL: http://weblog.infoworld.com/udell/2003/01/29.html#a584