JavaScript & AJAX For Dummies
xiv
It’s a wrap............................................................................................289
Alternating styles ...............................................................................290
Resetting the page .............................................................................290
More fun with selectors and lters ..................................................291
Chapter 12: Using the jQuery User Interface Toolkit. . . . . . . . . . . . . .293
Looking Over the ThemeRoller ..................................................................294
Visiting the Theme Park .............................................................................296
Wanna Drag? Dragging and Dropping Elements ......................................297
Downloading the Library ............................................................................300
Resizing on a Theme ...................................................................................301
Examining the HTML and standard CSS..........................................304
Importing les ....................................................................................304
Making a resizable element ..............................................................305
Adding themes to your elements .....................................................305
Adding an icon ...................................................................................308
Dragging, Dropping, and Calling Back .......................................................309
Building the basic page .....................................................................312
Initializing the page............................................................................312
Handling the drop ..............................................................................314
Dropping out can be fun ...................................................................315
Cloning the elements .........................................................................315
Chapter 13: Improving Usability with jQuery . . . . . . . . . . . . . . . . . . . .317
Multi-Element Designs ................................................................................317
Using the Accordion widget .............................................................318
Building a tabbed interface ..............................................................322
Using tabs with AJAX.........................................................................325
Improving Usability .....................................................................................327
The dating game .................................................................................329
Picking numbers with the slider ......................................................331
Selectable elements ...........................................................................333
Building a sortable list ...................................................................... 335
Creating a custom dialog box ...........................................................336
Chapter 14: Working with AJAX Data . . . . . . . . . . . . . . . . . . . . . . . . . .339
Getting an Overview of Server-Side Programming ..................................339
Introducing PHP .................................................................................340
Writing a form for PHP processing ..................................................341
Responding to the request ...............................................................344
Sending Requests AJAX-Style .....................................................................345
Sending the data ................................................................................346
Responding to the results .................................................................348
Building a More Interactive Form .............................................................349
Creating an AJAX form ......................................................................350
Writing the JavaScript code .............................................................352
Processing the result .........................................................................353
Simplifying PHP for AJAX ..................................................................353
02_417997-ftoc.indd xiv02_417997-ftoc.indd xiv 10/26/09 9:54 PM10/26/09 9:54 PM