![[Book Cover]](../covergif/0130863343.jpg)
|
DHTML and JavaScript, 1/e
Gilorien, Baltimore, Maryland
Published September, 1999 by Prentice Hall PTR (ECS Professional)
Copyright 2000, 1200 pp.
Paper Bound w/CD-ROM
ISBN 0-13-086334-3
$42.99
|
Sign up for future mailings on this subject.
See other books about:
Internet
![[Sample Chapter]](../images/cat_sampchap.gif)
![[Preface]](../images/cat_preface.gif)
|
Make the most of Netscape JavaScript 1.2/1.3 and DHTML!
Master the awesome Web power of DHTML, style sheets, and Netscape JavaScript 1.2/1.3! DHTML and JavaScript delivers all you need. It's a complete task-oriented tutorial, a detailed reference to JavaScript syntax, and a library of 400+ working examples that shows exactly how to build innovative Web sites with Netscape's hottest technologies. Coverage includes:
- Cascading Style Sheets, JavaScript Style Sheets, Layers, and extensive coverage on how to control them all with JavaScript.
- JavaScript object theory, statements, operators, functions, methods, expressions, variables, and properties.
- Demystifies the Document Object Model DOM.
- The new JavaScript Layer Object: key concepts and real-world sample code.
- In-depth Event Object coverage and implementation.
- Pattern matching with the new RegExp Object.
- Arrays, window, document, screen, navigator, Math, Date, and String Objects.
- Learn how to design your own online games with image-dragging or keyboard control.
- JavaScript 1.3's new JavaScript console and other enhancements.
Hands-on and comprehensive, DHTML and JavaScript lets you break through Web clutter -- and create the great-looking, top-performing sites you've always wanted to build!
@ CD-ROM Included.
The accompanying CD-ROM contains all of the working examples from the book and two hyper-linked versions of the book, which include a more extensive HTML Elements Primer, in both HTML and PDF formats, with 100+ bonus code examples! It even has an eleven-minute song from the author's first album.
GILORIEN is a freelance artist in both the 2D and 3D realm, a 3D animator, musician, and advanced Web site designer and consultant. His company, DreamPlay Studios, provides content and consulting for a wide variety of projects, and is currently working on a full-length 3D digital animated film.
I.DYNAMIC HTML.
1.STYLE SHEETS.
Introduction to Style Sheets. Style Sheets Overview. The Golden Rules for Styles. Cascading Style Sheets & JavaScript Style Sheets. Cascading Style Sheets. CSS Syntax Property Chart. CSS & JavaScript Syntax Property Comparison Chart. CSS Layer Properties and <LAYER> Attributes Chart. JavaScript Layer Object Properties Chart. Generic { font-family: } Names Chart. Styles Chart for HTML Elements. The <STYLE> Element. Handling Comments in Styles. <STYLE> Element Style. Cascading Style Sheet Properties. The { font-size: } Property. The { font-family: } Property. The { font-weight: } Property. The { font-style: } Property. The { line-height: } Property. The { text-decoration: } Property. The { text-transform: } Property. The { text-align: } Property. The { text-indent: } Property. Margins Overview. The { margin: } Property. The { margin-top: } Property. The { margin-right: } Property. The { margin-bottom: } Property. The { margin-left: } Property. Padding Overview. The { padding: } Property. The { padding-top: } Property. The { padding-right: } Property. The { padding-bottom: } Property. The { padding-left: } Property. Color Overview. The { color: } Property. The { background-color: } Property. The { background-image: } Property. Setting Borders Overview. The { border-style: } Property. The { border-color: } Property. Border Widths. The { border-width: } Property. The { border-top-width: } Property. The { border-right-width: } Property. The { border-bottom-width: } Property. The { border-left-width: } Property. The { width: } Property. Horizontal Alignment, Floating, and Clear. The { float: } Property. The { clear: } Property. The { white-space: } Property. The { list-style-type: } Property. Using Styles in the <STYLE> Element. <STYLE> Element with CLASS of STYLE. Naming your CLASS of STYLE. Defining a CLASS of STYLE without attaching it to an Element. The Keyword all. Attaching the same CLASS to more than one Element. Bordered Link workaround example. <STYLE> Element with ID Definition for CLASS Exceptions. Styles and Tables. <STYLE> Element with CONTEXTUAL SELECTION CRITERIA. Inheritance issues for CONTEXTUAL STYLEs. CONTEXTUAL SELECTION with CLASSes of STYLE and NAMED INDIVIDUAL STYLEs. More Style Uses. The STYLE Attribute. The <SPAN> Element. The <SPAN> Element with STYLE Attribute. The <SPAN> Element with CLASS Attribute. The <SPAN> Element with ID Attribute for CLASS Exceptions. External Style Sheets with the <LINK> Element. The <LINK> Element. Multiple External Style Sheets in one document. External Style Sheet precedence issues. Multiple <STYLE> Elements in one document.
2. Layers & Styles.
Creating Layers with Styles. Overview. Creating Layers with CSS Syntax. Creating a LAYER with the STYLE Attribute. Creating a LAYER with a CLASS of STYLE. The { position: } Property. The { left: } Property. The { top: } Property. The NAMED LAYER Style ( Creating a LAYER with the ID Attribute ). The { width: } Property. The { height: } Property. The { clip: } Property. The bugged version of the { clip: } Property. The unbugged version of the { clip: } Property. The { z-index: } Property. The { visibility: } Property. The { layer-background-color: } Property. The { layer-background-image: } Property. The { include-source: } Property. CSS Layer Properties and <LAYER> Attributes Chart. Creating Layers with the <LAYER> Element. The <LAYER> Element. The <ILAYER> Element. The <NOLAYER> Element.
3. Layers & JavaScript.
Introducing JavaScript Layers. Overview. Style Sheet Comments for JavaScript Syntax. New JavaScript Properties. New document Object Properties. The tags Property. The classes Property. The ids Property. JavaScript Style Sheets. JavaScript Style Sheets. Using the with() Statement. The JavaScript Keyword all. The contextual() Method. JavaScript Style Sheet Properties & Examples Chart. JavaScript Style Sheet Properties & All Values Chart. JavaScript and Layers. The JSS position Property. The HTML <SCRIPT> Element. Comment Tag to hide the contents of the <SCRIPT> Element. The JavaScript Keyword var. The JavaScript Layer Object. The JavaScript layers[i] Array. The two types of document Objects. Properties of the Layer Object. Properties of the Layer Object Chart. The document Property of the Layer Object. Invoking Methods on a Layer Object. The Layer Object name Property. The Layer Object left Property. The Layer Object top Property. The Layer Object pageX Property. The Layer Object pageY Property. The Layer Object visibility Property. The Layer Object zIndex Property. The Layer Object siblingAbove Property. The Layer Object siblingBelow Property. The Layer Object above Property. The Layer Object below Property. The Layer Object parentLayer Property. The Layer Object and Clipping Rectangles. Default Values for the Clipping Properties. The Layer Object clip.top Property. The Layer Object clip.left Property. The Layer Object clip.bottom Property. The Layer Object clip.right Property. The Layer Object clip.width Property. The Layer Object clip.height Property. The Layer Object bgColor Property. The Layer Object background Property. The Layer Object src Property. Methods of the Layer Object. The moveBy(dx, dy) Method. The moveTo(x, y) Method. The moveToAbsolute(x, y) Method. The resizeBy(dwidth, dheight) Method. The resizeTo(width, height) Method. The moveAbove(layerName) Method. The moveBelow(layerName) Method. The load("sourceURL", newPixelWidth) Method. Using JavaScript with Layers. The JavaScript write() Method. Using the write() & close() Methods. Using the moveAbove() Method. Show & Hide Layers & writing Layer content. The new Operator for creating new Layers in real-time. Dynamically create new Layers with tags Property Style. Localized JavaScript <SCRIPT>s within a Layer. Animating a Clipping Rectangle to reveal an Image. The JavaScript setTimeout() Method. The JavaScript clearTimeout() Method. Animating Clipping Rectangles and popping Images. Some JavaScript Tips. Animating control Layers and Images offscreen and onscreen. The JavaScript setInterval() Method. The JavaScript clearInterval() Method. Three examples to cycle through Background Colors repeatedly. A Tic Tac Toe game example. The JavaScript Date Object. Creating Date Objects with the four Date Constructors. Creating a Time Counter and Displaying the Current Time. Creating a Time Counter and Displaying the Current Time in a Frameset. The JavaScript Conditional Operator ?: The JavaScript Math Object. Math Object Property Summaries. Math Object Method Summaries. Randomly load different Background Images into a Layer. Using Math Methods in a quasi-calculator. Math Methods of Math.max(x,y), Math.min(x,y) and Math.pow(x,y). The JavaScript toString() Method. The JavaScript parseFloat() Function. The JavaScript parseInt() Function. The JavaScript isNaN() Function. The JavaScript charAt() Method. The JavaScript split() Method. The JavaScript slice() Method. The length Property of String Object. A really cool color conversion calculator. A compilation example with border animation and music.
II.JAVASCRIPT.
4. Objects & Functions.
JavaScript Objects. The JavaScript Object Hierarchy. Using JavaScript Objects. Object Properties and Methods. JavaScript Functions. Defining a Function with the Function Statement. Calling a Function by Attribute Assignment. Calling a Function by Name. Calling a Function from within a Function. Calling a Function by Property Assignment. The JavaScript Core Function Object. The arguments[i] Array Property of a Function. Nesting a Function within a Function. Summaries Charts. Predefined JavaScript Objects. Predefined JavaScript Arrays as Object Properties. Predefined JavaScript Core Objects. Predefined JavaScript Core Functions. The JavaScript Core Object. The JavaScript Core Object Overview. Creating Objects with its Constructor Function. Creating Methods for an Object. An Object as a Property in an Object Definition. The prototype Property to add a Method to an Object Type. Add a Property to an Object Instance after it is defined. The prototype Property to add a Property to an Object Type. Indexing Properties of an Object. Creating Objects with Literal Notation. Deleting an Object. The watch() Method of the Core Object. The unwatch() Method of the Core Object. Predefined JavaScript Objects. The JavaScript window Object. The open() Method of the window Object. The close() Method of the window Object. The scrollBy() Method of the window Object. The JavaScript document Object. The cookie Property of the document Object. The JavaScript screen Object. The JavaScript Location Object. The JavaScript History Object. The JavaScript navigator Object. Creating Frames on the fly. The JavaScript Number Core Object. The JavaScript select Object. The JavaScript options[i] Array. The JavaScript option Object. New JavaScript Core Functions. The JavaScript Number Core Function. The JavaScript String Core Function.
5. Statements & Operators.
JavaScript Statements. What are JavaScript Statements. Categories of Statements. Chart of all JavaScript Statements. Conditional Statements. The JavaScript if () Statement. The JavaScript if () else Statement. Nested if () Statement. Nested if () else Statement. The ( ) ?:Conditional Operator Statement. The switch( ) Statement. Loop Statements. The for( ) Statement. The while( ) Statement. The do while( ) Statement. The labeled : Statement. The break Statement. The continue Statement. Object Manipulation Statements. The for in Statement. The with( ) Statement. The with( ) Statement in a <STYLE> Element. The var Statement. The function Statement. The return Statement. The export Statement. The import Statement. The delete Statement. Comment Statements. Single & multiple-line Comment Statements. JavaScript Operators. What are JavaScript Operators? Categories of Operators. Special Operators. The Keyword new Operator. The Keyword this Operator. The Keyword typeof Operator. The Keyword void Operator. The ( , ) comma Operator. Comparison Operators. Arithmetic Operators. String Operators. Logical Operators. Assignment Operators. Bitwise Operators. JavaScript Expressions.
6. JavaScript Events.
Event Objects & Handlers. The JavaScript Event Model. JavaScript Event Objects and Event Handlers. Event Properties Summaries Chart. Modifiers Keys and ASCII Values Chart. The Structure of an Event Object. Specifying an Event by name with dot notation. Available Event Properties for each Event Object. Defining Event Handlers. Defining Event Handlers by Property Assignment. Testing for Modifiers Keys in Conditionals. Defining Event Handlers by Attribute Assignment. The JavaScript event Keyword. Testing for Multiple Modifiers Keys in Conditionals. Testing for Modifiers Keys pressed during Mouse Events. The load() Method of the Layer Object with Key Events. The fromCharCode() Method of the String Object with Key Events. Using Modifiers Keys with Regular Keys to Trigger Events. Determining the ASCII Value of a Pressed Key. Capturing & Releasing Events. The JavaScript captureEvents() Method. Capturing Events in Nested Layers. The JavaScript releaseEvents() Method. Using the type Property and captureEvents() Method on a Layer. Dragging an Image with the Mouse. The name Property of the target Property of the Event Object. Capturing Events for the window Object to Drag an Image. Using Localized Scripts to Drag an Image. Capturing and using KEYPRESS and KEYUP Events. Using the JavaScript switch() Statement & KEYDOWN, KEYPRESS, and KEYUP Events. Moving Layers with the switch() Statement. Animating Layers and Images. Animating Layers automatically and by clicking on an Image. Animating Layers with the e.target.name Property. Animating Layers in a Frameset environment. Controlling an External Frame document with JavaScript. The JavaScript linkColor, alinkColor and vlinkColor Properties. Using Key Events to hide and show Layers. Scrolling, Resizing, & Moving Windows with Key Events. The JavaScript scrollBy() Method. The JavaScript scrollTo() Method. Controlling your Window with a variety of Methods. ASCII Values for the which Property of the Event Object. Using Key Events to open a new Window. Creating user-customizable Documents. Drag on a Layer to Resize it. Routing & Handling Events. The JavaScript routeEvent(e) Function. Using the JavaScript routeEvent(e) Function. The JavaScript handleEvent(e) Method. Using the JavaScript handleEvent(e) Method. Handling and Routing Events in Nested and Unnested Layers.
7. JavaScript Arrays.
JavaScript Array Objects. The JavaScript Array Object. Create an Array with the Array Object Constructor. Create a dense Array. Create an Array with Literal notation. Creating Two-Dimensional Arrays. Creating Three-Dimensional Arrays. Array Property Summaries. Array Method Summaries. An Overview Example that uses all of the Array Methods. Array Object Methods. The concat() Method of the Array Object. The join() Method of the Array Object. The pop() Method of the Array Object. The push() Method of the Array Object. The shift() Method of the Array Object. The unshift() Method of the Array Object. The slice() Method of the Array Object. The splice() Method of the Array Object. The toString() Method of the Array Object. The toString() Method of the Array Element. The reverse() Method. The sort() Method. The compareFunction Function. Working with returned Arrays. Working with returned Arrays and Regular Expressions. The returned Array from the match() Method of String Objects. The returned Array from the match() Method with the "g" Flag. The returned Array from the exec() Method of RegExp Objects. The index Property of the Array Object. The returned Array from the split() Method of String Objects. The input Property of the Array Object. Using Arrays to fill <TABLE> Element Data Dynamically. Chart of Sample Files that use Arrays.
8. JavaScript Strings.
JavaScript String Objects. The JavaScript String Object. String Object Property Summaries. String Object Method Summaries. Using the String Object Constructor Function. Create a String Object with Literal notation. JavaScript Special Characters in Strings. String Object Character Array. Manipulative String Object Methods. The concat() Method of String Object. The charAt() Method of String Object. The charCodeAt() Method of String Object. The fromCharCode() Static Method of String Object. The indexOf() Method of String Object. The lastIndexOf() Method of String Object. String Object Methods used with Regular Expressions. The search() Method of String Object. The match() Method of String Object. The replace() Method of String Object. The split() Method of String Object. More String Object Methods. The slice() Method of String Object. The substring() Method of String Object. The substr() Method of String Object. Creating Anchors & Links. The anchor() Method of String Object. The link() Method of String Object. Decorative Methods of String Object. Overview. The toLowerCase() Method of String Object. The toUpperCase() Method of String Object. The fontcolor() Method of String Object. The fontsize() Method of String Object.
9. JavaScript RegExps.
JavaScript RegExp Objects. Regular Expression Objects Overview. Predefined RegExp Object. The Predefined RegExp Core Object. The input Property of the Predefined RegExp Core Object. The multiline Property of the Predefined RegExp Core Object. Property Summaries of the Predefined RegExp Core Object. Individual RegExp Objects. RegExp Objects created with Literal notation. RegExp Objects created with its Constructor Function. Patterns in Regular Expressions. Literal Characters in Patterns in Regular Expressions. Special Characters in Patterns in Regular Expressions. Parentheses in Patterns in Regular Expressions. Exploring Regular Expressions. Chart of all Special Characters for Regular Expressions. Method Summary of Individual RegExp Objects. Summary of String Methods used with Individual RegExp Objects. Property Summary of Individual RegExp Objects. The test() Method of Individual RegExp Objects. The exec() Method of Individual RegExp Objects. The compile() Method of Individual RegExp Objects. The lastIndex Property of Individual RegExp Objects. Example to verify phone number using Regular Expressions. exec() & match() Method differences. Example to verify name & address using Regular Expressions. A full Regular Expression example. Creating a Search Engine example.
III.JAVASCRIPT.
10. What's New & Changed.
What's New in JavaScript 1.3 & Changed in JavaScript. Overview of Features. JavaScript 1.3 and ECMA-262 Compliance. JavaScript 1.3 and Unicode. Changes to Objects. Changes to the Array Object. Changes to the Array Constructor. Change to the length Property of Array Object. New toSource() Method of Array Object. Change to the toString() Method of Array Object. Change to the push() Method of Array Object. Change to the splice() Method of Array Object. Changes to the Date Object. Changes to the Date Constructor. New Methods for the Date Object. Changes to preexisting Methods of the Date Object. Changes to the Function Object. The apply() Method of the Function Object. The call() Method of the Function Object. Changes to the String Object. New Method. The toSource() Method for several Objects. New Top-Level Properties. Infinity Property. NaN Property. undefined Property. New Top-Level Function. isFinite() Function. Changes to Top-Level Functions. eval() Function. New Operators. The === Operator. The !== Changes to Operators. Operator. The == Operator. The !=
Changes to Conditional Test Behaviors. Operator. Assignment Behaviors. null and undefined Values for Objects. Using the JavaScript Console to debug your code.
IV.RESOURCES.
APPENDIX A: HTML PRIMER.
Appendix B: Color Names and Values.
Appendix C: Sample Files Referenced.
Appendix D: Language Abbreviations.
Appendix E: Charts.
Appendix F: Index.
|