Home Page Icon
Home Page
Table of Contents for
Yahoo! JavaScript Developer Center
Close
Yahoo! JavaScript Developer Center
by Dori Smith, Tom Negrino
JavaScript and Ajax for the Web: Visual QuickStart Guide, Seventh Edition
Copyright
Dedication
Special Thanks to
Introduction
We wrote this book for you
How to use this book
You say browser, we say Kumbaya
Don’t type that code!
Time to get started
Getting Acquainted with JavaScript
What JavaScript Is
JavaScript Isn’t Java
Where JavaScript Came From
What JavaScript Can Do
What JavaScript Can’t Do
What Is Ajax?
The Snap-Together Language
Objects
Properties
Methods
Putting the pieces together
Introducing the Document Object Model
Handling Events
Values and Variables
Operators
Assignments and Comparisons
Comparisons
Writing JavaScript-Friendly HTML
Structure, presentation, and behavior
Divs and spans
Classes and ids
What Tools to Use?
Start Me Up!
Where to Put Your Scripts
About Functions
Using External Scripts
Putting Comments in Scripts
Alerting the User
Confirming a User’s Choice
More about conditionals
Prompting the User
Redirecting the User with a Link
Using JavaScript to Enhance Links
Using Multi-level Conditionals
Handling Errors
Your First Web App
Around and Around with Loops
More about loops
Passing a Value to a Function
Detecting Objects
Working with Arrays
Working with Functions That Return Values
Updating Arrays
Using Do/While Loops
Calling Scripts Multiple Ways
Combining JavaScript and CSS
Checking State
Working with String Arrays
Working with Images
Creating Rollovers
Creating More Effective Rollovers
Building Three-State Rollovers
Triggering Rollovers from a Link
Making Multiple Links Change a Single Rollover
Working with Multiple Rollovers
Creating Cycling Banners
Adding Links to Cycling Banners
Building Wraparound Slideshows
Displaying a Random Image
Cycling Images with a Random Start
Frames, Frames, and More Frames
Keeping a Page out of a Frame
Forcing a Page into a Frame
Forcing a Site into a Frame
Setting a Target
Creating and Loading a Dynamic Frame
Sharing Functions between Frames
Loading Multiple Frames at Once
Working with Iframes
Loading Iframes with JavaScript
Working with Windows
Opening a New Window
Loading Different Contents into a Window
Opening Multiple Windows
Updating One Window from Another
Closing a Window
Putting Windows in Their Place
Form Handling
Select-and-Go Navigation
Changing Menus Dynamically
Making Fields Required
Checking Fields against Each Other
Identifying Problem Fields
Putting Form Validation into Action
Working with Radio Buttons
Setting One Field with Another
Validating Zip Codes
Validating Email Addresses
Forms and Regular Expressions
Validating an Email Address with Regular Expressions
Validating a File Name
Extracting Strings
Formatting Strings
Formatting and Sorting Strings
Formatting and Validating Strings
Replacing Elements using Regular Expressions
Handling Events
Handling Window Events
The onload event
The onunload event
The onresize event
The onmove event
The onabort event
The onerror event
The onfocus event
The onblur event
Mouse Event Handling
The onmousedown event
The onmouseup event
The onmousemove event
The onmouseover event
The onmouseout event
The ondblclick event
The onclick event
Form Event Handling
The onsubmit event
The onreset event
The onchange event
The onselect event
The onclick event
The onblur event
The onfocus event
Key Event Handling
The onkeydown event
The onkeyup event
The onkeypress event
JavaScript and Cookies
Baking Your First Cookie
Reading a Cookie
Showing Your Cookies
Using Cookies as Counters
Deleting Cookies
Handling Multiple Cookies
Displaying “New to You” Messages
Objects and the DOM
About Node Manipulation
DOM-2 and the W3C
DOM-2 terminology
DOM-3
Adding Nodes
Deleting Nodes
Deleting Specific Nodes
Inserting Nodes
Replacing Nodes
Writing Code with Object Literals
Making Your Pages Dynamic
Putting the Current Date into a Web Page
Working with Days
Customizing a Message for the Time of Day
Displaying Dates by Time Zone
Converting 24-Hour to 12-Hour Time
Creating a Countdown
Hiding and Displaying Layers
Moving an Object in the Document
Date Methods
Introducing Ajax
Ajax: Pinning It Down
Reading Server Data
Parsing Server Data
Refreshing Server Data
Getting Data From a Server
Previewing Links with Ajax
Auto-Completing Form Fields
Ajax Toolkits
Dragging and Dropping Page Elements
Adding a Calendar to Your Page
Adding a 2-up Calendar to Your Page
Using the Container Utility
Adding Animation Effects
Implementing the Logger Control for Debugging
Applied JavaScript
Using Sliding Menus
Adding Pull-Down Menus
Enhancing Pull-down Menus
A Slideshow with Captions
A Silly Name Generator
A Bar Graph Generator
Style Sheet Switcher
Designing with Ajax
Highlighting New Elements
Creating Accordion Menus
Creating Smarter Dialogs
Striping Tables
Sorting Tables
Bookmarklets
Your First Bookmarklet
Resetting a Web Page’s Background
Changing a Page’s Styles
Word Lookups
Viewing Images
Displaying ISO Latin Characters
Converting RGB Values to Hex
Converting Values
A Bookmarklet Calculator
Shortening URLs
Validating Pages
Mailing Pages
Resizing Pages
JavaScript Genealogy and Reference
JavaScript Versions
Netscape’s JavaScript
Microsoft’s JScript
AOL
ECMAScript
Object Flowchart
The Big Object Table
JavaScript Reserved Words
JavaScript reserved words
Additional words reserved for future use by ECMAScript 3
ECMAScript 4 Reserved Words
ES4 Contextually Reserved Words
Other identifiers to avoid
Cascading Style Sheets Reference
Where to Learn More
Finding Help Online
Mozilla sites
Other useful sites
Microsoft’s JScript Language
Yahoo! User Interface Library
Yahoo! JavaScript Developer Center
Yahoo! Design Pattern Library
Weblogs
Ajaxian
QuirksMode
Continuing Intermittent Incoherency
Microsoft’s JScript Blog
Yahoo! User Interface Blog
Surfin’ Safari
Elsewhere
Books
JavaScript, The Definitive Guide
ppk on JavaScript
Bulletproof Ajax
Pro JavaScript Techniques
Search in book...
Toggle Font Controls
Playlists
Add To
Create new playlist
Name your new playlist
Playlist description (optional)
Cancel
Create playlist
Sign In
Email address
Password
Forgot Password?
Create account
Login
or
Continue with Facebook
Continue with Google
Sign Up
Full Name
Email address
Confirm Email Address
Password
Login
Create account
or
Continue with Facebook
Continue with Google
Prev
Previous Chapter
Yahoo! User Interface Library
Next
Next Chapter
Yahoo! Design Pattern Library
Yahoo! JavaScript Developer Center
http://developer.yahoo.com/javascript/
Add Highlight
No Comment
..................Content has been hidden....................
You can't read the all page of ebook, please click
here
login for view all page.
Day Mode
Cloud Mode
Night Mode
Reset