Instant download jQuery 1 3 with PHP 1st Edition Kae Verens pdf all chapter
Instant download jQuery 1 3 with PHP 1st Edition Kae Verens pdf all chapter
com
https://ebookname.com/product/jquery-1-3-with-php-1st-
edition-kae-verens/
OR CLICK BUTTON
DOWNLOAD EBOOK
https://ebookname.com/product/pro-php-and-jquery-1st-edition-jason-
lengstorf/
ebookname.com
https://ebookname.com/product/pro-php-and-jquery-1st-edition-jason-
lengstorf-2/
ebookname.com
https://ebookname.com/product/jquery-1-4-reference-guide-1st-edition-
karl-swedberg/
ebookname.com
https://ebookname.com/product/exploring-the-biological-contributions-
to-human-health-does-sex-matter-institute-of-medicine/
ebookname.com
Law s relations a relational theory of self autonomy and
law First Issued As Paperback Edition Nedelsky
https://ebookname.com/product/law-s-relations-a-relational-theory-of-
self-autonomy-and-law-first-issued-as-paperback-edition-nedelsky/
ebookname.com
https://ebookname.com/product/microsoft-system-center-network-
virtualization-and-cloud-computing-1st-edition-microsoft-corporation/
ebookname.com
https://ebookname.com/product/international-dictionary-of-
psychoanalysis-1st-edition-alain-de-mijolla/
ebookname.com
https://ebookname.com/product/diversity-and-equality-the-changing-
framework-of-freedom-in-canada-1st-edition-avigail-eisenberg/
ebookname.com
https://ebookname.com/product/substituting-ingredients-4e-the-a-to-z-
kitchen-reference-4th-edition-becky-sue-epstein/
ebookname.com
Oxford International Primary Geography Student Book 3
Terry Jennings
https://ebookname.com/product/oxford-international-primary-geography-
student-book-3-terry-jennings/
ebookname.com
jQuery 1.3 with PHP
Kae Verens
BIRMINGHAM - MUMBAI
This material is copyright and is licensed for the sole use by JEROME RAYMOND on 30th October 2009
125 Louis ST, , So. Hackensack, , 07606
jQuery 1.3 with PHP
All rights reserved. No part of this book may be reproduced, stored in a retrieval
system, or transmitted in any form or by any means, without the prior written
permission of the publisher, except in the case of brief quotations embedded in
critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of
the information presented. However, the information contained in this book is sold
without warranty, either express or implied. Neither the author, Packt Publishing,
nor its dealers or distributors will be held liable for any damages caused or alleged to
be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all the
companies and products mentioned in this book by the appropriate use of capitals.
However, Packt Publishing cannot guarantee the accuracy of this information.
ISBN 978-1-847196-98-9
www.packtpub.com
This material is copyright and is licensed for the sole use by JEROME RAYMOND on 30th October 2009
125 Louis ST, , So. Hackensack, , 07606
Credits
Acquisition Editor
Proofreader
Douglas Paterson
Chris Smith
Development Editor
Indexer
Darshana D. Shinde
Rekha Nair
Technical Editor
Production Coordinator
Ishita Dhabalia
Dolly Dasilva
Copy Editor
Cover Work
Sanchari Mukherjee
Dolly Dasilva
This material is copyright and is licensed for the sole use by JEROME RAYMOND on 30th October 2009
125 Louis ST, , So. Hackensack, , 07606
About the Author
Kae Verens lives in Monaghan, Ireland with his wife Bronwyn and their two kids
Jareth and Boann. He has been programming for twenty years, fifteen of which were
as a professional.
Kae started writing in JavaScript in the mid nineties, and started working on
the server-side languages a few years later. After writing CGI in C and Perl,
Kae switched to PHP in 2000, and has worked with it since then.
Kae is currently the secretary of the Irish PHP Users' Group, http://php.ie/,
is part-owner of the Irish web-development company Webworks.ie,
http://webworks.ie/, and is the author of popular web-based file-manager KFM,
http://kfm.verens.com/.
In his spare time, Kae plays the guitar, juggles, is learning to play the piano, and likes
to occasionally dust the skateboard off and mess around on it.
This material is copyright and is licensed for the sole use by JEROME RAYMOND on 30th October 2009
125 Louis ST, , So. Hackensack, , 07606
About the Reviewers
John K. Murphy is a graduate of the University of West Virginia and has been
wrapped up in computers and software development since the 1980s. When he is not
buried in a book or jumping out of an airplane, he works as an IT consultant.
John lives with his wife and two children in Pittsburgh, PA and is currently
obsessing about the Internet of Things.
This material is copyright and is licensed for the sole use by JEROME RAYMOND on 30th October 2009
125 Louis ST, , So. Hackensack, , 07606
This material is copyright and is licensed for the sole use by JEROME RAYMOND on 30th October 2009
125 Louis ST, , So. Hackensack, , 07606
Table of Contents
Preface 1
Chapter 1: Introduction and Overview 7
Expected developer skills 8
Differences between PHP and JavaScript 9
What is jQuery? 10
Why jQuery? 12
How does jQuery fit in with PHP? 13
How to work with the examples 14
Projects that use PHP and jQuery 16
WordPress 16
RoundCube 16
KFM 17
Drupal 18
Summary 18
Chapter 2: Quick Tricks 19
Dynamic select boxes 21
Client-side code 22
How it works 23
Server-side code 25
Quick deletes 26
Client-side code 27
Server-side code 30
Contextual help 31
Inline editing 36
Client-side code 36
Server-side code 41
Summary 41
This material is copyright and is licensed for the sole use by JEROME RAYMOND on 30th October 2009
125 Louis ST, , So. Hackensack, , 07606
Table of Contents
[ ii ]
This material is copyright and is licensed for the sole use by JEROME RAYMOND on 30th October 2009
125 Louis ST, , So. Hackensack, , 07606
Table of Contents
Auto-suggestion 87
Client-side code 88
Server-side code 89
Client-side code 90
Summary 91
Chapter 5: File Management 93
Security 93
Choosing a directory 95
Client-side code 95
Server-side code 97
Creating, renaming, and deleting
directories 100
Client-side code 100
Server-side code 104
Moving directories 105
Client-side code 105
Server-side code 108
File uploads 109
Client-side code 109
Server-side code 112
Renaming, deleting, and moving files 113
Client-side code 114
Server-side code 115
File downloads 116
Client-side code 116
Server-side code 117
Summary 118
Chapter 6: Calendars 119
Displaying the calendar 120
Creating an event 121
Client-side code 122
Server-side code 124
Loading events from the server 126
Client-side code 126
Server-side code 127
Moving and resizing events 128
Client-side code 128
Server-side code 129
[ iii ]
This material is copyright and is licensed for the sole use by JEROME RAYMOND on 30th October 2009
125 Louis ST, , So. Hackensack, , 07606
Table of Contents
[ iv ]
This material is copyright and is licensed for the sole use by JEROME RAYMOND on 30th October 2009
125 Louis ST, , So. Hackensack, , 07606
Table of Contents
[v]
This material is copyright and is licensed for the sole use by JEROME RAYMOND on 30th October 2009
125 Louis ST, , So. Hackensack, , 07606
Table of Contents
[ vi ]
This material is copyright and is licensed for the sole use by JEROME RAYMOND on 30th October 2009
125 Louis ST, , So. Hackensack, , 07606
Preface
Creating PHP applications that respond quickly, avoid unnecessary page reloads,
and provide great user interfaces, often requires complex JavaScript techniques.
Even then, if you get that far, the results might not 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 and drag-and-drop to data searching, and
much more. The book also provides practical demonstrations of PHP and jQuery and
explains these 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.
This material is copyright and is licensed for the sole use by JEROME RAYMOND on 30th October 2009
125 Louis ST, , So. Hackensack, , 07606
Preface
Chapter 2, Quick Tricks, looks at a few quick examples on how to interface PHP
and jQuery and a few tricks, which demonstrate how to relieve the most obvious
resource wastes on the server.
Chapter 3, Tabs and Accordions, walks through the creation of tabs and accordions
using the jQuery UI project, managing tabs and accordions using a rich text editor
and a bit of PHP, and using Ajax to populate your accordion and tab panels.
Chapter 4, Forms and Form Validation, explores form validation using jQuery
and PHP and how to use the same PHP configuration to validate on both
sides—the server and the client side. It also covers examples on optimization
of large select boxes and building auto-suggest fields.
Chapter 6, Calendars, builds a weekly calendar for you, which has events that can be
created, edited, moved around, and deleted. It also takes care of recurring events.
Chapter 8, Drag and Drop, demonstrates a few uses of drag and drop, including
sorting lists, dragging between lists, and hierarchical sorting, which can be used to
improve the usability of your content management system.
Chapter 9, Data Tables, builds a very large data table and discusses how to navigate,
sort, search, paginate, and search it using jQuery and Ajax.
Chapter 10, Optimization, shows the ways to optimize jQuery and various other
elements of the web development environment.
[2]
This material is copyright and is licensed for the sole use by JEROME RAYMOND on 30th October 2009
125 Louis ST, , So. Hackensack, , 07606
Exploring the Variety of Random
Documents with Different Content
Royal kept at work all the time that he was talking, sliding down
more boards, over those which he had put down first, to cover the
cracks. In the mean time, it began to rain; and the thunder grew
louder and louder. The wind howled about his ears, and rattled the
boards, and made it very difficult for him to place them. At length,
just as Royal was ready to go down, and get in under his hut
himself, a sudden gust took one of his boards, the upper end of
which extended upwards farther than the rest, and blew it and three
others away from their places, and carried them out to some
distance on the grass.
Marielle and the children were frightened at the noise; but it was
now raining so fast that they did not run out. Royal soon repaired
the breach with other boards, which he placed so that the wind
should not have any advantage in getting hold of them. At length,
when all seemed secure, Royal came down from the pile, and ran in
under the shelter, with the water running down off his hat and
clothes in streams.
“Now, Royal,” said Marielle, “you have got yourself all wet through,
making us a shelter.”
“That’s no matter,” said Royal. “It is good fun for a boy to get wet.”
Just then, a terrible clap of thunder burst, and rattled over their
heads, preceded by a vivid flash of lightning. They were all alarmed
at the sound. Royal, however, said that he thought that was the
worst clap they should have, and that now the storm would soon be
over.
And so it proved. The wind soon abated, and the thunder
appeared gradually to pass away to the eastward. It continued to
rain in torrents for some time; but then they were completely
protected from it, and did not get wet at all. It was an hour before
the rain was entirely over, so that they could go out and go home.
But then the air was bright, the sun was shining, and all nature
looked refreshed. Royal felt much better pleased with having been
the protector of his party, than with having teased and troubled
them as he had done on the former day. And though Marielle did not
say any thing about it, he knew that she was pleased with him too.
Royal liked Marielle for her gentleness and patience; and she liked
him for his energy and courage.
CHAPTER XI.
THE DICTIONARY.
One evening, Lucy was playing in the parlor where her mother was
at work sewing. Lucy was sitting upon a cricket, looking over a book.
Presently she found, between the leaves of the book, a small piece
of white paper.
“O mother! I’ve found a piece of paper,” said she.
Her mother did not answer.
“I wish I had a pen and ink,” said Lucy again, in a tone
intermediate between talking to herself and to her mother; “then I
would write a letter on this piece of paper.”
“And what would you do with your letter?” said her mother.
“Why, I would play that I was the postman, and so I would carry it
about.”
Just then Lucy happened to recollect that her father was in his
room writing; and so she concluded that she would go in and ask
him to write her a letter. She accordingly rose from her seat, and
went to the door of her father’s room.
The door was open a little way, and Lucy had a great mind to go
in without knocking. But, then, she remembered that it was proper
for her to knock at her father’s door, and she accordingly did so.
Nobody answered. Then Lucy pushed the door a little, so as to open
it wider, in order to see whether her father was there.
He was not there. There was nobody there. Lucy pushed the door
open farther, and walked in.
There was a lamp burning upon a table which stood against the
window. Several books and papers were upon the table. One great
book was lying open. There was a round, black inkstand not far from
the book. It had a large, conical hole in the middle of it, which led
down to the ink; and there were several smaller holes around, near
the edge, to put the pen into. There was a pen with its point in one
of these holes, the top of it leaning over to one side.
“Now, here’s a pen and ink all ready,” said Lucy; “but where’s my
father?”
Lucy walked up to the table, and began to look at the book which
was lying open. “What a great book!” she said. “I wonder if I can
read in such a great book. Here are some big letters on the top. I
can read such big letters as these.”
There were three big letters, in two places, on the top of each
page; and Lucy began to read them.
“H-o-n,” said Lucy, reading—“H-o-n spells hon; but I don’t know
what hon means. I wonder what this book is about.”
But Lucy could not find out what it was about, and so she thought
that, as her father was away, she would take the pen and write
herself a letter. She accordingly put her paper down upon the corner
of the table, and then, reaching over the great book, she dipped the
pen carefully into the conical hole in the middle of the inkstand. She
then drew the pen very slowly and cautiously to the paper, secretly
feeling, however, all the time, that she was doing wrong.
Lucy made several marks upon her paper, and then the ink in her
pen failed. She accordingly reached back to the inkstand to get some
more. She thought that she did not dip her pen far enough down
before, and that that was the reason why the ink failed so quick.
She, therefore, this time, dipped the pen in so far that the point of it
touched the bottom of the inkstand; and so, when it came up, it was
full of ink.
It was too full of ink, in fact, so that a little drop hung from the
point just ready to fall; and very unfortunately, just as Lucy had got
the pen almost across the great book, the drop did fall, and it made
quite a large, round spot upon the middle of one of the pages.
Lucy was very much frightened at this occurrence. She put the
pen back in its place, and began to walk as fast as she could go out
of the room. In a moment, however, she reflected that, as soon as
her father came in, he would see the ink spot, and would at once
inquire who made it. So she thought that she would come and shut
the book up, and that would keep the ugly-looking blot out of sight.
She accordingly came back hastily to the table, shut the book up,
and then went immediately away.
But, notwithstanding this ingenious precaution, her mind
continued in a state of great agitation and alarm. She went back to
her cricket, and began to look over her book again; but she felt very
wretched. Finally, she came to the very wise conclusion of going
back at once, and finding her father, and telling him all about the
affair.
She put her book down upon the cricket, and went again towards
her father’s room. She found her father just going into the room,
with a large book of maps under his arm.
“Well, Lucy,” said her father, “are you coming to see me?”
Lucy walked slowly towards him, with a downcast look, but she
said nothing. “What is the matter, Lucy?” said her father.
“Why,—why,” said Lucy, in a very low and timid voice,—“the ink
has got on your great book.”
“My great book? What book?” said her father.
“Your great book on the table;—that great book.”
So saying, Lucy pointed to the book upon the table; for by this
time they had got into the room where they could see the table and
the book upon it.
“Where?” said her father. “Where is the ink?”
“Somewhere in the middle of it,” said Lucy. “But I don’t suppose I
can find it now.”
Her father took up the great book, and began turning over the
leaves; but he did not find the ink spot.
“But, Lucy,” said he, “how did you get the ink upon my book?”
“Why, father,” said Lucy, “you see, I was going to write me a letter,
and the ink wouldn’t stay in the pen.”
“Now, Lucy, that was very wrong. You ought not to come to my
table, and to take my pen and ink without leave. How big was the
blot?”
“’Twas pretty big,” said Lucy, timidly.
“I can’t find the place,” said her father. “O, now I remember. It
must have been at horizon. I was looking horizon, to see how it was
accented.”
“No, sir, it was at hon. I remember now myself; it was at hon.”
Her father made no reply, but, after turning over a few leaves, he
came at once to the place, and there, to Lucy’s utter astonishment,
there were two blots, instead of one; there was one on each page.
They were very large, too, much larger than the one which Lucy had
seen.
“Now, there are two blots,” said Lucy; “how came that other one
there?”
“Why, that was made by shutting up the book,” said her father.
“How came the book shut up?”
“Why, I shut it, sir,” said Lucy.
“What did you shut it for?” said her father.
“Because,” said Lucy, speaking in a very timid voice again, “I did
not want you to see the blot.”
“Then what did you come and tell me for?” said her father.
“Why, I thought it would be better to come and tell you,” said
Lucy.
“You first shut the book in order to conceal it, and then you
altered your mind, and so came and told me; was that it?”
“Yes, sir,” said Lucy.
“Well,” said her father, “that was honest, at any rate. And the blot,
I see, is on the very word honesty. What a curious coincidence!”
“I don’t know what you mean by coincidence,” said Lucy.
“Why, you were honest in coming to tell me of the blot, and the
blot happens to be upon the word honesty. That’s a coincidence. I
am glad you were honest; but, then, you did very wrong to come
and attempt to write with my pen. You have done me a great deal of
mischief.”
“Can’t you get the blots out, any possible way?” asked Lucy.
“No, I presume not,” he replied. “I might try an acid, however,” he
added, in a low voice, as if talking to himself.
“I wish you would, father,” said Lucy. “Do try an acid, father.”
Lucy did not know what an acid was, nor how her father was
going to attempt to remove the ink stains by means of it; but she
was very eager to have him try any thing which promised any
chance of success.
“I don’t think I can take the spots out entirely,” said her father;
“but perhaps I can change their color, so that they will not be quite
so conspicuous.”
As he said this, he took the lamp and went away, Lucy following
him. He went to a closet which was in another room, and took down
a small phial, and poured out a few drops of the liquid which was in
it, into a tea-cup. Then he got some water, and poured about a
spoonful into the tea-cup too. Then he came back with Lucy into his
own room.
“First,” said he, “we will try it upon another piece of paper.”
So saying, he took a small piece of newspaper, and made a blot
upon it about as large as those which Lucy had made in the book.
Then he held the newspaper to the fire until the blot was dry.
“Now I must make a little brush,” said he.
“How can you make a brush?” said Lucy.
Her father only said in reply, “You will see.” He went to his closet,
and took a quill out from a bunch which was there. He cut off the
top, and put the quill back, and then brought the top to the table.
Then he stripped off all the feathers except a small tuft at the end,
and that, he said, was his brush.
This brush he dipped into the tea-cup, and then very carefully
washed over the ink spot upon the newspaper. Lucy saw that it
made the spot look much more dim. Then her father washed over
the spots in the book in the same way. The spots grew faint, and
turned of a reddish color; but he could not get them out entirely.
“It looks a great deal better,” said her father, “but I cannot get
them out entirely. There they must stay forever. I shall see them a
great many times, for they are in my dictionary, and I am often
turning over the leaves. And always when I see them I shall
remember how they came there. One of them will remind me of your
heedlessness, and the other of your honesty.”
THE END.
Transcriber’s Note:
Punctuation has been standardised; hyphenation retained as
it appears in the original publication.
Page 23
put back n good order changed to
put back in good order
Page 53
a screaming, chiruping, chattering, changed to
a screaming, chirruping, chattering,
Page 91
go to mill in his sleigh changed to
go to the mill in his sleigh
Page 139
Royal and William said that changed to
Royal and Thomas said that
Page 143
you an’t any bears at all changed to
you a’n’t any bears at all
Page 145
he is’nt going changed to
he isn’t going
*** END OF THE PROJECT GUTENBERG EBOOK COUSIN LUCY AT
PLAY ***
Updated editions will replace the previous one—the old editions will
be renamed.
1.D. The copyright laws of the place where you are located also
govern what you can do with this work. Copyright laws in most
countries are in a constant state of change. If you are outside the
United States, check the laws of your country in addition to the
terms of this agreement before downloading, copying, displaying,
performing, distributing or creating derivative works based on this
work or any other Project Gutenberg™ work. The Foundation makes
no representations concerning the copyright status of any work in
any country other than the United States.
1.E.6. You may convert to and distribute this work in any binary,
compressed, marked up, nonproprietary or proprietary form,
including any word processing or hypertext form. However, if you
provide access to or distribute copies of a Project Gutenberg™ work
in a format other than “Plain Vanilla ASCII” or other format used in
the official version posted on the official Project Gutenberg™ website
(www.gutenberg.org), you must, at no additional cost, fee or
expense to the user, provide a copy, a means of exporting a copy, or
a means of obtaining a copy upon request, of the work in its original
“Plain Vanilla ASCII” or other form. Any alternate format must
include the full Project Gutenberg™ License as specified in paragraph
1.E.1.
• You pay a royalty fee of 20% of the gross profits you derive
from the use of Project Gutenberg™ works calculated using the
method you already use to calculate your applicable taxes. The
fee is owed to the owner of the Project Gutenberg™ trademark,
but he has agreed to donate royalties under this paragraph to
the Project Gutenberg Literary Archive Foundation. Royalty
payments must be paid within 60 days following each date on
which you prepare (or are legally required to prepare) your
periodic tax returns. Royalty payments should be clearly marked
as such and sent to the Project Gutenberg Literary Archive
Foundation at the address specified in Section 4, “Information
about donations to the Project Gutenberg Literary Archive
Foundation.”
• You comply with all other terms of this agreement for free
distribution of Project Gutenberg™ works.
1.F.
1.F.4. Except for the limited right of replacement or refund set forth
in paragraph 1.F.3, this work is provided to you ‘AS-IS’, WITH NO
OTHER WARRANTIES OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO WARRANTIES OF
MERCHANTABILITY OR FITNESS FOR ANY PURPOSE.
Please check the Project Gutenberg web pages for current donation
methods and addresses. Donations are accepted in a number of
other ways including checks, online payments and credit card
donations. To donate, please visit: www.gutenberg.org/donate.
Most people start at our website which has the main PG search
facility: www.gutenberg.org.