jQuery 1.3 with PHP


jQuery 1.3 with PHP
eBook: $23.99
Formats: PDF, PacktLib, ePub and Mobi formats
$20.39
save 15%!
Print + free eBook + free PacktLib access to the book: $63.98    Print cover: $39.99
$39.99
save 37%!
Free Shipping!
UK, US, Europe and selected countries in Asia.
Also available on:
Overview
Table of Contents
Author
Reviews
Support
Sample Chapters
  • Combine client-side jQuery with your server-side PHP to make your applications more efficient and exciting for the client
  • Learn about some of the most popular jQuery plugins and methods
  • Create powerful and responsive user interfaces for your PHP applications
  • Complete examples of PHP and jQuery with clear explanations
  • No JavaScript expertise or jQuery experience required

Book Details

Language : English
Paperback : 248 pages [ 235mm x 191mm ]
Release Date : October 2009
ISBN : 1847196985
ISBN 13 : 9781847196989
Author(s) : Kae Verens
Topics and Technologies : All Books, Web Development, Content Management (CMS), jQuery, Open Source, Web Development

Back to BOOK PAGE

Table of Contents

Preface
Chapter 1: Introduction and Overview
Chapter 2: Quick Tricks
Chapter 3: Tabs and Accordions
Chapter 4: Forms and Form Validation
Chapter 5: File Management
Chapter 6: Calendars
Chapter 7: Image Manipulation
Chapter 8: Drag and Drop
Chapter 9: Data Tables
Chapter 10: Optimization
Index
  • Chapter 1: Introduction and Overview
    • Expected developer skills
    • Differences between PHP and JavaScript
    • What is jQuery?
    • Why jQuery?
    • How does jQuery fit in with PHP?
    • How to work with the examples
    • Projects that use PHP and jQuery
      • WordPress
      • RoundCube
      • KFM
      • Drupal
    • Summary
  • Chapter 2: Quick Tricks
    • Dynamic select boxes
      • Client-side code
        • How it works
      • Server-side code
    • Quick deletes
      • Client-side code
      • Server-side code
    • Contextual help
    • Inline editing
      • Client-side code
      • Server-side code
    • Summary
  • Chapter 3: Tabs and Accordions
    • Using a jQuery tab plugin
      • Client-side code
      • Server-side considerations
    • Using jQuery accordion plugins
      • Client-side code
    • Server-side management of accordions
      • Client-side code
      • Server-side code
        • Just the conversion
        • Now show the data with the accordions
    • Server-side management of tabs
      • Server-side code
        • Just the conversion
        • Now show the data with the tabs
    • Using special codes to define tabs
      • Client-side code
      • Server-side code
    • Loading accordion panels through Ajax
      • Client-side code
      • Server-side code
    • Loading tab panels through Ajax
      • Client-side code
    • Summary
  • Chapter 4: Forms and Form Validation
    • Using the jQuery validation plugin
      • Client-side code
    • Setting up jQuery validation from PHP
      • Server-side code (setup)
      • Client-side code
      • Server-side code
    • Remote validation
      • Server-side code (setup)
      • Client-side code
      • Server-side code
    • Large select boxes
      • Client-side code
      • Server-side code
    • Auto-suggestion
      • Client-side code
      • Server-side code
      • Client-side code
    • Summary
  • Chapter 5: File Management
    • Security
    • Choosing a directory
      • Client-side code
      • Server-side code
    • Creating, renaming, and deleting directories
      • Client-side code
      • Server-side code
    • Moving directories
      • Client-side code
      • Server-side code
    • File uploads
      • Client-side code
      • Server-side code
    • Renaming, deleting, and moving files
      • Client-side code
      • Server-side code
    • File downloads
      • Client-side code
      • Server-side code
    • Summary
  • Chapter 6: Calendars
    • Displaying the calendar
    • Creating an event
      • Client-side code
      • Server-side code
    • Loading events from the server
      • Client-side code
      • Server-side code
    • Moving and resizing events
      • Client-side code
      • Server-side code
    • Editing events
      • Client-side code
      • Server-side code
    • Deleting events
      • Client-side code
      • Server-side code
    • Walk-through of the calendar so far
    • Recurring events
      • Client-side code
      • Server-side code
    • Deleting recurring events
      • Client-side code
      • Server-side code
    • Summary
  • Chapter 7: Image Manipulation
    • Showing the list of images
      • Server-side code
      • Client-side code
    • Selecting an image
      • Client-side code
      • Server-side code
    • Preparing your PHP
    • Rotating
      • Client-side code
      • Server-side code
    • Caching or saving the image
      • Client-side code
      • Server-side code
    • Resizing
      • Client-side code
      • Server-side code
    • Cropping
      • Client-side code
      • Server side
    • Summary
  • Chapter 8: Drag and Drop
    • Sorting simple lists
      • Client-side code
      • Server-side code
      • Client-side code
    • Sorting trees
      • Client-side code
      • Server-side code
    • Connecting lists
      • Client-side code
      • Server-side code
    • Summary
  • Chapter 9: Data Tables
    • Setting up DataTables
      • Client-side code
    • Getting data from the server
      • Client-side code
      • Server-side code
    • Caching your database queries
      • Server-side code
    • Pagination through Ajax
      • Client-side code
      • Server-side code
    • Sorting by column
    • Filtering
      • Server-side code
    • Setting a delay on the filter
    • Summary
  • Chapter 10: Optimization
    • Optimizing the page load
      • Place scripts at the bottom
      • Aggregate and cache your scripts
      • Output HTML similar to the post-jQuery code
    • Optimizing development and maintenance
      • Writing your own plugins
      • Un-caching your JavaScript
    • Optimizing jQuery
      • Use Google's CDN
      • Caching jQuery objects
      • Use $.load for non-visual code
    • JavaScript optimizations
      • Chaining
      • Speeding up selectors
      • Inject multiple elements at once
      • Using setTimeout
      • Use var for your variables
    • Summary
Back to BOOK PAGE

Kae Verens

Kae Verens is an owner manager of the web-development company Webworks.ie and is currently secretary of the Irish PHP Users Group. He has been writing in JavaScript since the mid 90s, and in PHP since the late 90s. Kae is the creator of the file management system KFM, the CMS WebME (used by Webworks.ie for over 200 separate clients), and the author of the Packt book jQuery 1.3 with PHP.

 

Code Downloads

Download the code and support files for this book.


Submit Errata

Please let us know if you have found any errors not listed on this list by completing our errata submission form. Our editors will check them and add them to this list. Thank you.


Errata

- 4 submitted: last submission 29 Aug 2013

 

 

Errata type: Technical/typo | Page number: 84

f(!(include $fn))$errors[]=$hname.' Should be if(!(include $fn))$errors[]=$hname.' '

 

 

Errata type: Code | Page number: 38

After the line "var str=$(this).html();", add the following line:

this.originalHTML=str;

 

Page 26 | Errata type: Code

The last <option> tag is never closed in the echo statement. Change the second to last line from:

'</select>';
to:
'</option></select>;

Page 30 | Errata type: Code

The echo statement returns invalidly formatted json, as such the example will not work as written. All json strings need to be encapsulated by double quotes (see requirements for json string at http://www.json.org/) instead of single quotes. It might be more clear to replace this text with something that uses json_encode()

$id=(int)@$_REQUEST['id'];
$success = ( !($id%2) );
$response = compact('id', 'success');
if(!$success) { $response['error'] = 'Could not delete subscriber'; }
echo json_encode($response);

Sample chapters

You can view our sample chapters and prefaces of this title on PacktLib or download sample chapters in PDF format.

Frequently bought together

jQuery 1.3 with PHP +    JBoss AS 7 Configuration, Deployment and Administration =
50% Off
the second eBook
Price for both: ₨302.22

Buy both these recommended eBooks together and get 50% off the cheapest eBook.

What you will learn from this book

  • Integrate jQuery into your PHP applications
  • Add tabs and accordions using the jQuery-UI project to make your pages easier to read
  • Validate forms locally and remotely
  • Enhance your existing form controls, optimize large select-boxes, build auto-suggest fields for your forms.
  • Manipulate images non-destructively
  • Manage your files and directories
  • Create your own jQuery plugins
  • Write a weekly calendar
  • Use a drag/drop mechanism to sort lists and create hierarchical menus
  • Paginate, order, and search large data sets

In Detail

To make PHP applications that respond quickly, avoid unnecessary page reloads, and provide great user interfaces, often requires complex JavaScript techniques and even then, if you get that far, they might not even work across different browsers! With jQuery, you can use one of the most popular JavaScript libraries, forget about cross-browser issues, and simplify the creation of very powerful and responsive interfaces – all with the minimum of code.
This is the first book in the market that will ease the server-side PHP coder into the client-side world of the popular jQuery JavaScript library.

This book will show you how to use jQuery to enhance your PHP applications, with many examples using jQuery's user interface library jQuery UI, and other examples using popular jQuery plugins. It will help you to add exciting user interface features to liven up your PHP applications without having to become a master of client-side JavaScript.

This book will teach you how to use jQuery to create some really stunning effects, but without you needing to have in-depth knowledge of how jQuery works. It provides you with everything you need to build practical user interfaces for everything from graphics manipulation to drag-and-drop to data searching, and much more. The book also provides practical demonstrations of PHP and jQuery and explains those examples, rather than starting from how JavaScript works and how it is different from PHP.

By the end of this book, you should be able to take any PHP application you have written, and transform it into a responsive, user-friendly interface, with capabilities you would not have dreamed of being able to achieve, all in just a few lines of JavaScript.

A practical guide for building responsive user interfaces for your web site's PHP applications, using jQuery, jQuery UI, and jQuery plugins

Approach

This book takes a practical approach to integrating PHP and jQuery, showing examples of every point discussed. All examples are written such that you should be able to copy out the code into your own projects and see immediate results, no matter what your experience with JavaScript. You will find projects developed within a chapter, building them up step-by-step, describing the process and thought that goes into it. Minimal requirements are needed on the server-side, so the examples should work with any setup.

Who this book is for

This book is for PHP application developers who want to improve their user interfaces through jQuery's capabilities and responsiveness. Whether you are familiar with jQuery or have only dabbled a little with JavaScript, this book will provide you with numerous practical examples of how to improve your application.

Code Download and Errata
Packt Anytime, Anywhere
Register Books
Print Upgrades
eBook Downloads
Video Support
Contact Us
Awards Voting Nominations Previous Winners
Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
Resources
Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software