JavaScript for New Programmers
USDA Graduate School
Tuesdays April 11-May 16, 2006, 6-9PM (6 sessions)
Dr. William M. Pegram, bill@billpegram.com, 703-486-0952 (home)Text: New Perspectives on JavaScript: Comprehensive by Patrick Carey and Frank Canovatchel, Thomson Course Technology, 2006, ISBN 0-619-26797-6. Student datafiles for this book are available for download at www.course.com/catalog/downloads.cfm?isbn=0-619-26797-6. Course handouts and assignments will be available on www.billpegram.com
Prerequisite: HTML Programming: Introduction (COMP7100E) and HTML Programming: Intermediate (COMP8010E). Credit: 1.8 CEU
Objectives:
- Write compact, efficient scripts in JavaScript.
- Master JavaScript's program structure, syntax, and most important commands, including arithmetic and logical operators, scalar and array variables, control structures, and functions
- Interactive navigation bars that respond to the user's mouse movements are a staple in Web design. Learn how to build seamless interactive rollovers without hindering your page's display in older browsers. In addition, learn how to design other dynamic effects with JavaScript.
- JavaScript enables calculations to occur in forms as the user enters the information. For example, a JavaScript calculator could instantaneously compute the mortgage payment of the user as she changes the variables such as down-payment, interest rate, term of loan, etc. Then, as she submits her application to the server, JavaScript can check the form to ensure the proper information has been filled in appropriately.
- Increase your site's credibility with real-time dynamic content. For example, tailor your messages to the user's time of day; displaying the appropriate message accordingly.
- Build pages that open and close browser windows based on the user's actions. For example, an online quiz might make use of pop-up windows to display whether the user's answer is correct, and then automatically close after a certain amount of time.
Content/Schedule
I will assess student background and interest in determining the pace of the course and in choosing content. HTML and CSS will be reviewed as necessary. To cover the objectives listed above, we would need to cover Tutorials 1-6 and Sections 1 and 2 in Tutorial 7. If that proves too ambitious, I intend to defer Sections 5.2 and 5.3 to the advanced course.
Software
You will only need a browser and text editor. It is useful to have both Netscape and IE available for testing and understanding error messages, and it is useful to have a text editor with line numbers, since error messages will reference the line number.