JavaScripts and Dynamic HTML Workshop Dan Farkas and Narayan Murthy Pace University Pleasantville, NY dfarkas@pace.edu nmurthy@pace.edu JavaScript is a lightweight programming language that was developed by Netscape to create dynamic web pages. JavaScript source code is embedded in HTML documents. When an HTML document is loaded using a browser, the JavaScript source code is also loaded along with the HTML code. The client browser interprets the JavaScript code. Salient features of JavaScript: * Currently supported by both Netscape and Internet Explorer * Program source code directly embedded in an HTML document * Event driven programming * Compact and easy to learn * Object-based scripting language * Can use to develop client and server internet applications * Interpreted language (interpreted by the browser) * Each statement goes on a separate line. If two statements are placed on the same line a semicolon separates them. In comparison to Java, JavaScript language: * Resembles Java * Supports Java's expression syntax and basic control flow constructs * Does not have Java's static typing * Type checking is not as strong as Java * Object based (Java is object-oriented). Uses built-in, extensible objects * No classes; no inheritance * Variables are not declared - data type of variables is decided by context * Cannot automatically write to hard disk The topics covered in the workshop include: Introduction to JavaScript JavaScript Language Basics Events in JavaScripts Selected JavaScript Objects Multimedia in JavaScripts Dynamic HTML and JavaScript Several examples will be demonstrated during the workshop. Authors provide a notes developed by them.