Book description
This book is for intermediate programmers interested in building AJAX web applications using jQuery and PHP. Along with teaching some advanced PHP techniques, it will teach you how to take your dynamic applications to the next level by adding a JavaScript layer with jQuery.
Learn to utilize built-in PHP functions to build calendar tools.
Learn how jQuery can be used for AJAX, animation, client-side validation, and more.
Table of contents
- Copyright
- About the Author
- About the Technical Reviewer
- Acknowledgments
-
I. Getting Comfortable with jQuery
-
1. Introducing jQuery
- 1.1. Choosing jQuery over JavaScript
- 1.2. Setting Up a Testing Environment
- 1.3. Including jQuery in Web Pages
- 1.4. Setting up a Test File
- 1.5. Summary
-
2. Common jQuery Actions and Methods
- 2.1. Understanding the Basic Behavior of jQuery Scripts
-
2.2. Understanding jQuery Methods
-
2.2.1. Traversing DOM Elements
- 2.2.1.1. .eq()
- 2.2.1.2. .filter() and .not()
- 2.2.1.3. .first() and .last()
- 2.2.1.4. .has()
- 2.2.1.5. .is()
- 2.2.1.6. .slice()
- 2.2.1.7. .children()
- 2.2.1.8. .closest()
- 2.2.1.9. .find()
- 2.2.1.10. .next(), .nextAll(), and .nextUntil()
- 2.2.1.11. .prev(), .prevAll(), and .prevUntil()
- 2.2.1.12. .siblings()
- 2.2.1.13. .parent()
- 2.2.1.14. .parents() and .parentsUntil()
- 2.2.1.15. .add()
- 2.2.1.16. .andSelf()
- 2.2.1.17. .contents()
- 2.2.1.18. .end()
- 2.2.2. Creating and Inserting DOM Elements
- 2.2.3. Accessing and Modifying CSS and Attributes
- 2.2.4. Affecting Result Sets
- 2.2.5. Using Animation and Other Effects
- 2.2.6. Handling Events
- 2.2.7. Using AJAX Controls
-
2.2.1. Traversing DOM Elements
- 2.3. Summary
-
1. Introducing jQuery
-
II. Getting Into Advanced PHP Programming
-
3. Object-Oriented Programming
- 3.1. Understanding Object-Oriented Programming
- 3.2. Understanding Objects and Classes
- 3.3. Comparing Object-Oriented and Procedural Code
- 3.4. Summary
-
4. Build an Events Calendar
- 4.1. Planning the Calendar
-
4.2. Building the Calendar
- 4.2.1. Creating the Database
- 4.2.2. Connecting to the Database with a Class
- 4.2.3. Creating the Class Wrapper
- 4.2.4. Adding Class Properties
- 4.2.5. Building the Constructor
- 4.2.6. Loading Events Data
- 4.2.7. Outputting HTML to Display the Calendar and Events
- 4.2.8. Outputing HTML to Display Full Event Descriptions
- 4.3. Summary
- 5. Add Controls to Create, Edit, and Delete Events
-
6. Password Protecting Sensitive Actions and Areas
- 6.1. Building the Admin Table in the Database
- 6.2. Building a File to Display a Login Form
- 6.3. Creating the Admin Class
- 6.4. Allowing the User to Log Out
- 6.5. Displaying Admin Tools Only to Administrators
- 6.6. Summary
-
3. Object-Oriented Programming
-
III. Combining jQuery with PHP Applications
-
7. Enhancing the User Interface with jQuery
- 7.1. Adding Progressive Enhancements with jQuery
- 7.2. Include jQuery in the Calendar App
-
7.3. Creating a Modal Window for Event Data
- 7.3.1. Binding a Function to the Click Event of Title Links
- 7.3.2. Preventing the Default Action and Adding an Active Class
- 7.3.3. Extracting the Query String with Regular Expressions
- 7.3.4. Creating a Modal Window
- 7.3.5. Retrieve and Display Event Information with AJAX
- 7.3.6. Add a Close Button
- 7.3.7. Add Effects to the Creation and Destruction of the Modal Window
- 7.4. Summary
-
8. Editing the Calendar with AJAX and jQuery
- 8.1. Opening the Event Creation Form
- 8.2. Saving New Events in the Database
- 8.3. Adding Events Without Refreshing
- 8.4. Editing Events in a Modal Window
- 8.5. Confirming Deletion in a Modal Window
- 8.6. Summary
-
7. Enhancing the User Interface with jQuery
-
IV. Advancing jQuery and PHP
-
9. Performing Form Validation with Regular Expressions
-
9.1. Getting Comfortable with Regular Expressions
- 9.1.1. Understanding Basic Regular Expression Syntax
- 9.1.2. Drilling Down on the Basics of Pattern Modifiers
- 9.1.3. Getting Fancy with Backreferences
- 9.1.4. Matching Character Classes
- 9.1.5. Finding Word Boundaries
- 9.1.6. Using Repetition Operators
- 9.1.7. Detecting the Beginning or End of a String
- 9.1.8. Using Alternation
- 9.1.9. Using Optional Items
- 9.1.10. Putting It All Together
- 9.2. Adding Server-Side Date Validation
- 9.3. Adding Client-Side Date Validation
- 9.4. Summary
-
9.1. Getting Comfortable with Regular Expressions
-
10. Extending jQuery
-
10.1. Adding Functions to jQuery
-
10.1.1. Adding Your Date Validation Function to jQuery
- 10.1.1.1. Allowing Custom Aliases in jQuery Plugins
- 10.1.1.2. Attaching the Function to the jQuery Object
- 10.1.1.3. Allowing Configurable Options
- 10.1.1.4. Extending Default Options with User-Supplied Options
- 10.1.1.5. Performing Validation and Returning a Value
- 10.1.1.6. Conforming to jQuery Plugin File Naming Conventions
- 10.1.2. Modifying the Include Script
- 10.1.3. Modifying the Initialization Script
-
10.1.1. Adding Your Date Validation Function to jQuery
- 10.2. Adding Methods to jQuery
- 10.3. Summary
-
10.1. Adding Functions to jQuery
-
9. Performing Form Validation with Regular Expressions
Product information
- Title: Pro PHP and jQuery
- Author(s):
- Release date: June 2010
- Publisher(s): Apress
- ISBN: 9781430228479
You might also like
book
Professional jQuery
A complete, in-depth look at jQuery If you're looking for a single resource that completely encompasses …
book
Pro PHP and jQuery, Second Edition
Take advantage of the improved performance and reduced memory requirements of PHP version 7, and learn …
book
Ajax with PHP 5
"Ajax with PHP 5" is a detailed overviewof how to use PHP technologies to createinteractive, fault-tolerant, …
book
jQuery Pocket Reference
"As someone who uses jQuery on a regular basis, it was surprising to discover how much …