How Client Scripting (e.g., JavaScript) Works...
 | The script is contained within the HTML of the web
page. It may be found in a script tag or as as DHTML code tied to a
form event (or other CSS event). |
 | Client scripts are "programs" that run within
the browser environment. |
 | The programming languages are relatively powerful with
data, control, and structuring syntax in addition to being able to access
object-based features of the web browser. |
 | The script is processed by a "scripting
engine" that is part of the browser. |
 | The scripting engine has access to the web document
object, HTML and form objects, and many system functions (date, time,
ability to access cookies) |
 | Script engines may not read and write other files
(security reasons primarily) in the operating system of the client computer. |
 | Implementation of the scripting engine is operating
system (to some degree) and browser (more so) dependent. |
 | There are
subtle differences in JavaScript for Netscape and JScript
for Internet Explorer. |

Common Uses of JavaScript in Web Pages
 | User interface presentation (e.g., button
transitions, dynamically modifying layout, etc.), usually used to draw
attention to information/content on a web page |
 | Entertainment - special effects and
"eye-catchers" |
 | Education - support quizzes and testing activities |
 | Information presentation - slide shows, animations |
 | Calculators - browser based calculators (math,
payment/interest, special purpose) |
 | Data validation - check forms for completeness and or
pre-processing prior to sending data to a server |
JavaScript is also used a "server-based" programming
environment. Typically it is extended with objects to support
server-based operations (file open, save; database access, etc.).
Keys to Learning JavaScript
 | Develop a basic understanding of the DOM (Document
Object Model-different for various browsers) and DHTML (Dynamic HTML), specifically...
 | Various HTML and form objects |
 | The use of the "name" property |
 | Basic use of properties for DHTML |
 | Events and how they are triggered |
|
 | Understand the use of the script tag with other HTML. |
 | Get a handle on basic JavaScript syntax (parenthesis,
brackets, etc.). JavaScript is similar to C and Java. |
 | Understand how a web applications work in order to
create your own applications (in other words, understand the browser). |
 | Also...
 | Don't try to memorize all functions, properties,
methods |
 | Build a library of usable constructs |
 | Build simple into complex |
 | Plan, plan, plan |
 | Test, test, test |
 | Never trust a browser you haven't tested! |
|
Tips and Tricks
 | Don't try to learn the entire JavaScript language at
once. |
 | Use examples to learn, use examples to build (from this
you will learn). |
 | Never write what you have already written (keep
libraries). |
 | Never write something someone else has already written
(especially when you can get your hands on it). |
Web Sites for JavaScript
|