Chengyu Sun California State University, Los Angeles
The Desktop Experience
The Desktop Advantage
HTML Event Models
Example: Event Handling
Events and Event Handler
Java. Script
Core Java. Script
Object Creation – Approach 1
Object Creation – Approach 2
Object Creation – Approach 3
Functions as First-class Citizens
Function Examples
Client-Side Java. Script
Processing an HTML Document
Document Object Model (DOM)
DOM Representation
Manipulate a Document
Find Elements
Modify Elements. . .
. . . Modify Elements
Create Elements
Example: Document Manipulation
Create Desktop-Like Web Applications
Communicate with Server
Understand Asynchronous …
… Understand Asynchronous
An XMLHttp. Request Example
About the Example
XMLHttp. Request - Properties
XMLHttp. Request - Methods
So What is Ajax?
More About AJAX
Key Elements of an Ajax Operation Process the request Send back a response
Problems of Plain Java. Script + Xml. Http. Request
Java. Script/Ajax Frameworks and Libraries
One Library to Rule Them All j. Query
A j. Query Example
Use j. Query Library
j. Query Wrapper Selector
Basic Selectors
Combine Selectors
Other Selectors and Filters
What Can We Do With An Element
Typical Event and Event Handling in j. Query Event Handler
Document Ready Event (not recommended)
Other Events
DOM Manipulation Example:
AJAX with j. Query