[TriLUG] Javascript.. why?

Steve Litt slitt at troubleshooters.com
Sun Dec 14 11:59:43 EST 2008


On Sunday 14 December 2008 02:44:18 am Maxwell Spangler wrote:
> A question to the full time web developers out there:  Why so much
> Javascript on web pages these days?

I'm not a fulltime web developer, but I'll be glad to tell you why I used 
JavaScript on 3 Troubleshooters.Com web pages and on all my Paypal buttons...

Somewhere in the early to mid 00's I decided that Troubleshooters.Com's main 
page, which had been a table of graphics, each of which links to a subsite, 
was too gaudy and unprofessional. I wanted to change it to a hover menu. 
Hover menus are a dime a dozen, but most involve very compex code with many, 
many browser #ifdefs. I wanted something simpler, and something useful even 
to those with old browsers, so I used javascript/css to create the 1 level 
hovermenu you see at http://www.troubleshooters.com/troubleshooters.htm.

A few years ago I made pricing principles for my courses and courseware 
logical enough to provide price calculators to would-be customers. I used 
javascript to create the calculators at 
http://www.troubleshooters.cxm/utp/courseware_cost_calculator.htm and 
http://www.troubleshooters.cxm/utp/onsite_cost_estimator.htm. Although I 
could have performed the calculations on the server each time the person 
entered a field, I'm old enough to remember how nice instantaneous field 
level validation was, so I used Javascript to do all calculations on the 
browser.

When I instituted Paypal on my site in early 2006, I found Paypal's standard 
buttons unacceptable because, for those on dialup, in certain situations, 
clicking on the buttons produced absolutely no feedback for several seconds. 
I'm a firm believer that every user action should be immediately acknowledged 
so that the user knows the computer program "heard" him, and so the user 
knows the computer isn't hung. So, using Javascript, I created Paypal buttons 
that, upon clicking, instantly grow bigger, turn into a table, and display a 
message to please wait 4 to 60 seconds for the Paypal page to display. Upon 
return to the original page, the table reverts to a button.

In each of the preceding cases, I used Javascript because it was the easiest 
way, THAT I KNEW OF, to accomplish what I needed accomplished. All pages in 
the Troubleshooters.Com Bookstore have javascript, but outside the Bookstore, 
less than 1 percent of Troubleshooters.Com pages have javascript. Personally 
I find plain HTML sufficient, efficient and secure for giving information to 
people. My next Linux Professional Magazine will deal with the subject of 
plain html.

SteveT

Steve Litt
Recession Relief Package
http://www.recession-relief.US




More information about the TriLUG mailing list