Client-side scripts for improved usability
It has been said that too much power can be dangerous. That saying is befitting when it comes to enhancing or creating Web widgets with client-side scripts. Web widgets, as you might recall from Part 1, are controls used in Web forms, dialogs, and wizards to elicit information from users. While scripts allow developers to create an infinite variety of Web widgets and behaviors, straying too far from users' expectations can lead to usability problems. Jodi Bollaert describes some common usability problems associated with client-side scripts and Web widgets, and suggest ways to avoid them.
What is a client-side script?
Scripts generally come in two flavors -- client-side and server-side.
As the names imply, client-side scripts execute on the client (the
user's machine) and server-side scripts execute on a server. A
client-side script is embedded in HTML documents within the
Client-side scripts can be used to extend the capability of HTML Web widgets or create completely new widgets. Some of the popular client-side scripts used today include:
- Java Applets
- Flash (Actionscript)
Developers can usually create similar functionality with more than one type of script. The choice of which script to use may depend on developer expertise, target platforms, and target browser types and versions. (More on this below.) While this article won't tell you HOW to develop scripts, I will share some tips on how your scripts can enhance, rather than hinder, your site's usability. There is a wealth of information available about how to develop scripts on the Web and in books (see Resources).