万本电子书0元读

万本电子书0元读

顶部广告

PHP jQuery Cookbook电子书

售       价:¥

14人正在读 | 1人评论 9.8

作       者:Vijay Joshi

出  版  社:Packt Publishing

出版时间:2010-12-14

字       数:200.0万

所属分类: 进口书 > 外文原版书 > 电脑/网络

温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
Written in Packt's cookbook style, this book presents numerous practical examples that you can use directly in your applications. The book covers most of the essential issues you will face while developing your web applications and gives solutions to them. Recipes in the book are written in a manner that will rapidly take you from a beginner to expert level. If you want to use PHP and jQuery together to create web applications this book is for you. It provides a large number of examples in each chapter that will take you from a basic developer to a pro by giving step-by-step instructions for each task in developing web applications using PHP and jQUery. All you need are JavaScript basics and you are on your way to building power web applications, with this book in hand.
目录展开

PHP jQuery Cookbook

Table of Contents

PHP jQuery Cookbook

Credits

About the Author

About the Reviewers

www.PacktPub.com

Support files, eBooks, discount offers, and more

Why Subscribe?

Free Access for Packt account holders

Preface

What this book covers

What you need for this book

Who this book is for

Conventions

Reader feedback

Customer support

Errata

Piracy

Questions

1. Handling Events with jQuery

Introduction

Executing functions when page has loaded

Getting ready

How to do it...

How it works...

Passing a handler to .ready()

Another method of using .ready()

Multiple .ready() methods

Binding and unbinding elements

Getting ready

How to do it...

How it works...

There's more...

Binding multiple events

Shortcut method for binding

Triggering events

Common event types

Unbinding all events from an element

Adding events to elements that will be created later

How to do it...

How it works...

Removing event handlers with die()

See also

Submitting a form with jQuery

Getting ready

How to do it...

How it works...

There's more...

Controlling form submission

See also

Checking for missing images

Getting ready

How to do it...

How it works...

See also

Creating the select/unselect all checkboxes functionality

Getting ready

How to do it...

How it works...

There's more...

Using selectors

Capturing mouse events

Getting ready

How to do it...

How it works...

Creating keyboard shortcuts

Getting ready

How to do it...

How it works...

There's more...

List of common key codes

See also

Displaying user selected text

Getting ready

How to do it...

How it works...

There's more...

Short method for getting selected text

Dragging elements on a page

Getting ready

How to do it...

How it works...

See also

2. Combining PHP and jQuery

Introduction

Fetching data from PHP using jQuery

Getting ready

How to do it...

How it works...

See also

Creating a query string automatically for all form elements

Getting ready

How to do it...

How it works...

There's more...

serializeArray() method

Not all values are serialized

Name should be provided to elements

See also

Detecting an AJAX request in PHP

Getting ready

How to do it...

How it works...

There's more...

Don't rely on X-Requested-With alone

Sending data to PHP

Getting ready

How to do it...

How it works...

There's more...

Alternative method for $.post()

See also

Aborting AJAX requests

Getting ready

How to do it...

How it works...

See also

Creating an empty page and loading it in parts

Getting ready

How to do it...

How it works...

There's more...

Difference between load and get

See also

Handling errors in AJAX requests

Getting ready

How to do it...

How it works...

There's more...

Parameters passed to error callback

The ajaxError() method

See also

Preventing browser from caching AJAX requests

How to do it...

How it works...

There's more...

Only GET requests are cached

See also

Loading JavaScript on demand to reduce page load time

Getting ready

How to do it...

How it works...

There's more...

Alternative method for getScript

See also

3. Working with XML Documents

Introduction

Loading XML from files and strings using SimpleXML

Getting ready

How to do it...

How it works...

There's more...

Parameters for simplexml_load_file

simplexml_load_string

Using SimpleXMLElement to create an object

More info about SimpleXML and libxml

See also

Accessing elements and attributes using SimpleXML

Getting ready

How to do it...

How it works...

There's more...

Modifying an XML with SimpleXML

Adding elements to an XML

See also

Searching elements using XPath

Getting ready

How to do it...

How it works...

There's more...

More info about XPath

See also

Reading an XML using DOM extension

Getting ready

How to do it...

How it works...

There's more...

Getting child nodes

nodeType, nodeName, and nodeValue

See also

Creating an XML using DOM extension

Getting ready

How to do it…

How it works...

See also

Modifying an XML using DOM extension

Getting ready

How to do it...

How it works...

There's more...

Deleting nodes

See also

Parsing XML with jQuery

Getting ready

How to do it...

How it works...

There's more...

The delegate() method

See also

4. Working with JSON

Introduction

Creating JSON in PHP

Getting ready

How to do it...

How it works...

There's more...

Predefined constants

See also

Reading JSON in PHP

Getting ready

How to do it...

How it works...

See also

Catching JSON parsing errors

Getting ready

How to do it...

How it works...

See also

Accessing data from a JSON in jQuery

Getting ready

How to do it...

How it works...

There's more...

Other AJAX methods for requesting JSON data

Handling errors while requesting JSON

Parsing a JSON

See also

5. Working with Forms

Introduction

Adding input fields dynamically in a form

Getting ready

How to do it...

How it works...

There's more...

Getting values on server side

Searching for user-inputted string in a page

Getting ready

How to do it...

How it works...

There's more...

Search and replace

Checking for empty fields using jQuery

How to do it...

How it works...

There's more...

Validating fields one by one

See also

Validating numbers using jQuery

Getting ready

How to do it...

How it works...

See also

Validating e-mail and website addresses using regular expressions

Getting ready

How to do it...

How it works...

There's more...

References for regular expressions

See also

Displaying errors as user types: Performing live validation

Getting ready

How to do it…

How it works...

See also

Strengthening validation: validating again in PHP

Getting ready

How to do it...

How it works...

There's more...

List of Validate filters

Sanitizing data

See also

Creating a voting system

Getting ready

How to do it...

How it works...

There's more...

Cookie expiration time

See also

Allowing HTML inside text areas and limiting HTML tags that can be used

Getting ready

How to do it...

How it works...

There's more...

PHP tags are stripped too

6. Adding Visual Effects to Forms

Introduction

Creating a Tic-Tac-Toe game with effects

Getting ready

How to do it...

How it works...

There's more...

Exercise—checking for a draw

Informing a user while an AJAX request is in progress

Getting ready

How to do it...

How it works...

There's more...

Using text instead of images

Using overlays to stop a user from interacting with the form

See also

Creating expandable and collapsible boxes (accordion)

Getting ready

How to do it...

How it works...

There's more...

Using different markup for accordion

Fading an element after updating it

Getting ready

How to do it...

How it works...

Floating box on demand

Getting ready

How to do it...

How it works...

There's more...

Important note about animate

Updating items in a shopping cart

Getting ready

How to do it...

How it works...

There's more...

Removing items from the cart

See also

7. Creating Cool Navigation Menus

Introduction

Creating a basic drop-down menu

Getting ready

How to do it...

How it works...

There's more...

Opening menus on click

See also

Creating a menu that changes background on mouse-over

Getting ready

How to do it...

How it works...

See also

Creating an accordion style menu

Getting ready

How to do it...

How it works...

There's more...

jQueryUI Accordion

See also

Creating a floating menu

Getting ready

How to do it...

How it works...

See also

Creating an interface for tabbed navigation

Getting ready

How to do it...

How it works...

Adding more tabs

Getting ready

How to do it...

How it works...

There's more...

Displaying new tab by default

See also

Creating a wizard using tabs

Getting ready

How to do it...

How it works...

See also

8. Data Binding with PHP and jQuery

Introduction

Fetching data from a database and displaying it in a table format

Getting ready

How to do it...

How it works...

There's more...

What is a constructor?

Collecting data from a form and saving to a database

Getting ready

How to do it...

How it works...

There's more...

real_escape_string() function

Return values for mysqli->query()

See also

Filling chained combo boxes that depend upon each other

Getting ready

How to do it...

How it works...

Checking username availability from database

Getting ready

How to do it...

How it works...

There's more...

Alternative methods for implementation

Paginating data for large record sets

Getting ready

How to do it...

How it works...

Adding auto-suggest functionality to a textbox

Getting ready

How to do it...

How it works...

See also

Creating a tag cloud

Getting ready

How to do it...

How it works...

See also

9. Enhancing your Site with PHP and jQuery

Introduction

Sending cross-domain requests using server proxy

Getting ready

How to do it...

How it works...

See also

Making cross-domain requests with jQuery

Getting ready

How to do it...

How it works...

There's more...

About JSONP

See also

Creating an endless scrolling page

Getting ready

How to do it...

How it works...

There's more...

Loading data from other sources

Creating a jQuery plugin

Getting ready

How to do it...

How it works...

Displaying RSS feeds with jQuery and PHP

Getting ready

How to do it...

How it works...

See also

A. Firebug

Introduction

Inspecting elements

How to do it...

How it works...

There's more...

Plugins for firebug

See also

Editing HTML and CSS

How to do it...

There's more...

Changing style for a specific element

Debugging JavaScript

How to do it...

There's more...

Debugging in a nutshell

Inspecting AJAX requests

Web developer toolbar

Index

累计评论(0条) 2个书友正在讨论这本书 发表评论

发表评论

发表评论,分享你的想法吧!

买过这本书的人还买过

读了这本书的人还在读

回顶部