100% found this document useful (2 votes)
16 views

Learning JavaScript 2nd Edition Shelley Powers - The full ebook version is ready for instant download

The document provides information about the book 'Learning JavaScript, 2nd Edition' by Shelley Powers, including download links and related ebook recommendations. It outlines the book's content, structure, and intended audience, emphasizing its focus on JavaScript fundamentals and advanced topics like Ajax. Additionally, it mentions supplemental resources available online for readers to enhance their learning experience.

Uploaded by

setemoguzz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (2 votes)
16 views

Learning JavaScript 2nd Edition Shelley Powers - The full ebook version is ready for instant download

The document provides information about the book 'Learning JavaScript, 2nd Edition' by Shelley Powers, including download links and related ebook recommendations. It outlines the book's content, structure, and intended audience, emphasizing its focus on JavaScript fundamentals and advanced topics like Ajax. Additionally, it mentions supplemental resources available online for readers to enhance their learning experience.

Uploaded by

setemoguzz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 46

Visit ebookfinal.

com to download the full version and


explore more ebooks or textbooks

Learning JavaScript 2nd Edition Shelley Powers

_____ Click the link below to download _____


https://ebookfinal.com/download/learning-javascript-2nd-
edition-shelley-powers/

Explore and download more ebooks or textbook at ebookfinal.com


Here are some recommended products that we believe you will be
interested in. You can click the link to download.

Adding Ajax 1st ed Edition Shelley Powers

https://ebookfinal.com/download/adding-ajax-1st-ed-edition-shelley-
powers/

Getting Started with the Web 1st Edition Shelley Powers

https://ebookfinal.com/download/getting-started-with-the-web-1st-
edition-shelley-powers/

Learning PHP MySQL JavaScript and CSS 2nd Edition Robin


Nixon

https://ebookfinal.com/download/learning-php-mysql-javascript-and-
css-2nd-edition-robin-nixon/

Learning Three js the JavaScript 3D Library for WebGL 2nd


Edition Jos Dirksen

https://ebookfinal.com/download/learning-three-js-the-
javascript-3d-library-for-webgl-2nd-edition-jos-dirksen/
Object Oriented JavaScript 2nd Edition Stoyan Stefanov

https://ebookfinal.com/download/object-oriented-javascript-2nd-
edition-stoyan-stefanov/

Pro JavaScript Techniques 2nd Edition John Resig

https://ebookfinal.com/download/pro-javascript-techniques-2nd-edition-
john-resig/

Advanced Javascript 2E 2nd Edition Chuck Easttom

https://ebookfinal.com/download/advanced-javascript-2e-2nd-edition-
chuck-easttom/

Frankenstein Mary Shelley

https://ebookfinal.com/download/frankenstein-mary-shelley/

Learning JavaScript Add Sparkle and Life to Your Web Pages


3rd Edition Ethan Brown

https://ebookfinal.com/download/learning-javascript-add-sparkle-and-
life-to-your-web-pages-3rd-edition-ethan-brown/
Learning JavaScript 2nd Edition Shelley Powers Digital
Instant Download
Author(s): Shelley Powers
ISBN(s): 9780596521882, 059652188X
File Details: PDF, 7.31 MB
Year: 2008
Language: english
Learning JavaScript

SHELLEY POWERS

Beijing • Cambridge • Farnham • Köln • Sebastopol • Tokyo


A Note Regarding
Supplemental Files
Supplemental files and examples for this book can be found at
http://examples.oreilly.com/9780596521882/. Please use a
standard desktop web browser to access these files, as they
may not be accessible from all ereader devices.

All code files or examples referenced in the book will be


available online. For physical books that ship with an
accompanying disc, whenever possible, we’ve posted all
CD/DVD content. Note that while we provide as much of the
media content as we are able via free download, we are
sometimes limited by licensing restrictions. Please direct any
questions or concerns to [email protected].
Preface
JavaScript was originally intended to be a scripting interface
between a web page loaded in the browser client (Netscape
Navigator at the time) and the application on the server. Since
its introduction in 1995, JavaScript has become a key
component of web development, and has found uses
elsewhere as well.

This book covers the JavaScript language, from its most


primitive data types that have been around since the beginning
of the language, to its most complex features, including those
that have to do with Ajax and dynamic page effects. After
reading this book, you will have the basics you need to work
with even the most sophisticated libraries and web
applications.

Audience
Readers of this book should be familiar with web page
technology, including Cascading Style Sheets (CSS) and
HTML/XHTML. Previous programming experience isn’t
required, though some sections may require extra review if you
have no previous exposure to programming.

This book should help:


Anyone who wants, or needs, to integrate JavaScript into
his own personal website or sites

Anyone who uses a content-management tool, such as a


weblogging tool, and wants to better understand the
scripting components incorporated into her tool templates

Web developers who seek to integrate JavaScript and


some of the dynamic web page/Ajax features into their
websites

Web service developers who want to develop for a new


market of clients

Teachers who use web technologies as either the focus or


a component of their courses

Web page designers who wish to better understand how


they can enliven their designs with interactive or animated
effects

Anyone interested in web technologies

Assumptions and Approach


As stated earlier, this book assumes you have experience with
HTML and CSS, as well as a general understanding of how
web applications work. Programming experience isn’t
necessary, but the book covers all aspects of JavaScript, some
of which are relatively sophisticated. Though the heavier
pieces are few, you will need to understand JavaScript well
enough to work with the newer Ajax libraries.
The Development Environment
Working with JavaScript can be especially challenging because
your applications have to work not only on different types of
machines, but also in several different browsers. If you look at
web server logfiles for a site, you can see accesses from
modern browsers, such as Firefox 3 and IE8, as well as
ancient browsers such as IE5.

You can get caught up in trying to create JavaScript for all


possible variations of operating system and browser, but a
better bet is to pick a group of target browsers that matches the
browsers used by most of the people accessing your web
pages, and use these to test your applications. You may find
that your applications won’t work with older browsers, but at
some point, you won’t be able to support all environments for
all people.

Throughout this book, I’ll be mentioning “target browsers” when


I mention how a piece of JavaScript works. For the book, my
target browsers are Firefox 3.x, Opera 9.x, Safari 3.x (including
recent builds of WebKit, the infrastructure that forms the basis
of Safari), and primarily IE8, the next version of Internet
Explorer. Most of the examples for IE should also work with IE
7.x and IE 6.x, and I’ll try to note otherwise. Here is a list of the
URLs where you can access these browsers:

You can download Firefox from http://www.mozilla.com/en-


US/firefox/.
Safari is installed with Mac OS X, but you can also access
it for the Mac and Windows at
http://www.apple.com/safari/. Safari is based on the open
source WebKit project, which provides nightly builds for
testing at http://webkit.org/.

You can access Opera at http://www.opera.com/.

Internet Explorer is built into Windows, but you can access


the IE8 beta at http://www.microsoft.com/windows/internet-
explorer/beta/default.aspx.

JavaScript and browser development is very dynamic, and this


adds a unique challenge when writing a book on JavaScript.
Though I tried to include the most updated coverage of
JavaScript, both the JavaScript specification (the ECMAScript
specification, to be more accurate) and the browsers
themselves were undergoing significant changes. For instance,
as I was in the editing phase of this book, the ECMAScript
working group announced plans to abandon work on what was
known as JavaScript 2 and focus on a new interim specification
release, ECMAScript 3.1. However, most of the changes in the
newer ECMAScript aren’t implemented in many of the target
browsers. In the cases where I was relatively confident that the
specification introduced a functionality that will be implemented
in future browsers, I made a note, at a minimum, of upcoming
changes.

In addition, browser makers are always introducing new


versions of their tools. The target browsers used to test
examples in this book reflect the state of the browsers at the
time I wrote the book, which may not quite reflect what you’ll
find when you read the book.

However, most of the material I’ve focused on is “classic”


JavaScript, which not only is stable, but also will always form
the platform on which new changes to both browser and
scripting language are based. Most, if not all, of the examples
in this book should work in older and future browsers, as well
as the target browsers used to test the examples.

Knock on wood.
How the Book Is Organized
The book is organized into six loosely grouped sections.

Chapters 1 through 3 provide an introduction to the structure of


a JavaScript application, including the simple data types
supported in the language, as well as the basic statements and
control structures. These establish a baseline of understanding
of the language for the sections that follow.

Chapters 4 and 5 introduce the main JavaScript objects,


String, Number, and Boolean, in addition to other built-in
objects, such as Math, RegExp (for regular expressions),
Array, and the all-important Function.

Chapter 6 takes a breather from the language bits and


prepares the reader for the more complex scripting examples
later in the book by introducing the browser debugging tools,
as well as troubleshooting techniques.

Chapter 7 introduces event handling, and Chapter 8 then


expands on the subject by covering form events and
JavaScript applications with forms.

Chapters 9 through 11 delve into the more sophisticated


aspects of web page development. These chapters cover the
Browser Object Model (BOM) and the newer Document Object
Model (DOM), and show how you can create your own custom
objects. Understanding these models is essential if you wish to
create new windows, or individually access, modify, or even
dynamically create any page element. In addition, with custom
objects, you can move beyond the capabilities that are pre-built
into either language or browser. Also included in these
chapters is a look at browser cookies and some of the more
modern client-side storage techniques.

Chapters 12 through 15 finish the book by diving into the


advanced uses of JavaScript, including dynamic page effects
and Ajax, as well as a more detailed look at using XML or
JavaScript Object Notation (JSON) with Ajax applications.

Though I try to follow a logical course when covering


JavaScript, sometimes I’ll need to use functionality in an
example that I won’t cover in detail until a later chapter. When
this occurs, I’ll try to make a note about which chapter includes
coverage of the more advanced functionality.
A Chapter Breakdown
The following is a detailed breakdown of this book’s contents,
including a brief description of what each chapter covers:

Chapter 1, Hello JavaScript!


Introduces JavaScript and provides a quick first look at a
small web page application. This chapter also covers some
issues associated with the use of JavaScript, including
some good programming practices recommended for
JavaScript applications.
Chapter 2, JavaScript Data Types and Variables
Provides an overview of the basic data types in JavaScript,
as well as an overview of language variables, identifiers,
and the structure of a JavaScript statement.

Chapter 3, Operators and Statements


Covers the basic statements of JavaScript, including
assignment, conditional, and control statements, as well as
the operators necessary for all three.

Chapter 4, The JavaScript Objects


Introduces the three primary built-in JavaScript objects,
including Number, String, and Boolean, as well as Date
and Math. The chapter also introduces the RegExp object,
which provides the facilities to do pattern matching.

Chapter 5, Functions
Focuses on one other JavaScript built-in object: Function.
Function is key to creating custom objects, as well as
packaging blocks of JavaScript into reusable functionality
that can be invoked more than once in an application.

Chapter 6, Troubleshooting, Debugging, and Cross-Browser


Issues
Briefly introduces the debugging environments for the
book’s target browsers (Internet Explorer, Safari, Firefox,
and Opera), as well as covers basic cross-browser
development.

Chapter 7, Catching Events


Focuses on event handling, including both the original form
of event handling (which is still commonly used in many
applications) as well as the newer DOM-based event
handling.

Chapter 8, Forms, Form Events, and Validation


Introduces using JavaScript with forms and form fields,
including how to access each field type—such as text input
fields and drop-down lists—and validate the data once
retrieved. Form validation before the form is submitted to
the web server helps prevent an unnecessary round trip to
the server, and thus saves both time and resource use. This
chapter also briefly introduces issues related to security and
forms.

Chapter 9, Browser As Puzzle Box


Begins to look at object models accessible from JavaScript,
starting with the Browser Object Model—a hierarchy of
objects including the window, document, forms, history,
location, and so on. Through the BOM, JavaScript can open
windows; access page elements such as forms, links, and
images; and even create some basic dynamic effects.

Chapter 10, Cookies and Other Client-Side Storage


Techniques
Covers script-based cookies, which store small pieces of
data on the client’s machine. With cookies, you can store
usernames, passwords, and other information so that users
don’t have to keep reentering data. In addition, this chapter
provides a brief overview of new and upcoming client-side
storage techniques, such as Google’s Gears and HTML5
local storage that offer capabilities beyond what a cookie
can provide. The chapter also includes a review of the
JavaScript sandbox.

Chapter 11, The DOM, or Web Page As Tree


Focuses on the DOM, a straightforward, but not trivial,
object model that provides access to all document elements
and attributes. Though the model is comprehensive and its
coverage is fairly straightforward, the chapter could present
some challenging moments for new programmers.

Chapter 12, Dynamic Pages


Provides a general introduction to dynamically altering the
web page, including modifying an individual element’s style,
as well as adding and removing elements from the page.
Some of the effects we’ll explore in this chapter include
drag-and-drop, collapsing and expanding page sections,
visibility, and movement. An understanding of CSS is
required.

Chapter 13, Creating Custom JavaScript Objects


Demonstrates how to create custom objects in JavaScript
and covers the prototype structure that enables such
structures in the language. We’ll discuss some
programming language concepts, such as inheritance and
encapsulation, but you don’t need prior experience with
these concepts to benefit from reading this chapter.

Chapter 14, Moving Outside the Page with Ajax


Introduces Ajax, which, despite all the excitement it has
generated, is actually not a complicated use of JavaScript.
The chapter walks through a complete example, including
server-side code.
Chapter 15, Ajax Data: XML or JSON?
Expands on the example in Chapter 14 that demonstrated
Ajax with an HTML fragment by demonstrating how to
generate and process XML through an Ajax application,
and then how to do the same with JSON. We’ll cover the
advantages of both techniques, as well as when to use one
over the other.

Conventions Used in This Book


The following typographical conventions are used in this book:
Constant width
Used for command lines and options that should be typed
verbatim, C# keywords, and code examples

Constant width italic


Used for replaceable items, such as variables or optional
elements, within syntax lines or code
Constant width bold

Used for emphasis within program code


Italic
Used for pathnames, filenames, Internet addresses (such
as domain names and URLs), and new terms where they
are defined

NOTE

Indicates a tip, suggestion, or general note.

WARNING

Indicates a warning or caution.

Using Code Examples


This book is here to help you get your job done. In general, you
may use the code in this book in your programs and
documentation. You do not need to contact us for permission
unless you’re reproducing a significant portion of the code. For
example, writing a program that uses several chunks of code
from this book does not require permission. Selling or
distributing a CD-ROM of examples from O’Reilly books does
require permission. Answering a question by citing this book
and quoting example code does not require permission.
Incorporating a significant amount of example code from this
book into your product’s documentation does require
permission.

We appreciate, but do not require, attribution. An attribution


usually includes the title, author, publisher, and ISBN. For
example: “Learning JavaScript, Second Edition, by Shelley
Powers. Copyright 2009 Shelley Powers, 978-0-596-52187-5.”

If you feel your use of code examples falls outside fair use or
the permission given here, feel free to contact us at
[email protected].

Safari® Books Online


NOTE

When you see a Safari® Books Online icon on the cover of your favorite
technology book, that means the book is available online through the O’Reilly
Network Safari Bookshelf.

Safari offers a solution that’s better than e-books. It’s a virtual


library that lets you easily search thousands of top tech books,
cut and paste code samples, download chapters, and find
quick answers when you need the most accurate, current
information. Try it for free at http://safari.oreilly.com.

How to Contact Us
We have tested and verified the information in this book to the
best of our ability, but you might find that features have
changed (or even that we have made mistakes!). Please let us
know about any errors you find, as well as your suggestions for
future editions, by writing to:

O’Reilly Media, Inc.


1005 Gravenstein Highway North
Sebastopol, CA 95472
800-998-9938 (in the United States or Canada)
707-829-0515 (international/local)
707-829-0104 (fax)

To ask technical questions or comment on the book, send


email to:

[email protected]

We have a web page for this book where we list examples and
any plans for future editions. You can access this information
at:

http://www.oreilly.com/catalog/9780596521875

For more information about books, conferences, Resource


Centers, and the O’Reilly Network, see the O’Reilly website at:
http://www.oreilly.com

Acknowledgments
I want to thank my editing and review team for helping me write
a better book. This includes technical editors Tony Ruscoe,
Jeni Tennison, Matthew Russell, and Trey Holdener, who did
an excellent job reviewing the content, as well as my long-time
editor, Simon St.Laurent. In addition, I’d like to thank the other
members of the production team: Rachel Monaghan, Sumita
Mukherji, Joe Wizda, and Jessamyn Read.
Chapter 1. Hello JavaScript!
One reason JavaScript is so popular is that it’s relatively easy
to add JavaScript to a web page. All you need to do, at a
minimum, is include an HTML script element in the page,
specify "text/javascript" for the type attribute, and add
whatever JavaScript you want:

<script type="text/javascript">
...some JavaScript
</script>

Installation is not required, nor do you have to torturously work


through any odd library path configurations. JavaScript works,
straight out of the box and in most web browsers, including the
big four: Firefox, Internet Explorer, Opera, and Safari. All you
need to do is add a scripting block, and you’re in business.

Traditionally, you add JavaScript blocks to the head element in


the document (delimited by opening and closing head tags),
but you also can include them in the body element—or even in
both sections. However, adding script to the body is not usually
considered a good technique, as it makes it more difficult to find
the script when you’re modifying it at a later time. The exception
to this rule is when performance is an issue, which I’ll cover in
Chapter 6. All of the examples in this book add scripting blocks
only to the web page head section.
Hello World!
Also traditionally, the first example when learning a new
programming language is known as “Hello, World”—a simple
application that prints out “Hello, World!” to the user interface,
whatever it may be. In the case of JavaScript, the user interface
is the web page. Example 1-1 shows a web page with a
JavaScript block that, using only one line of JavaScript, pops
open a small window commonly called an alert box with the
words “Hello, World!”

Example 1-1. The smallest JavaScript application: “Hello,


World!”
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-
transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
lang="en">
<head>
<title>Hello, World!</title>
<meta http-equiv="Content-Type" content="text/html;
charset=utf-8" />

<script type="text/javascript">

alert("Hello, World!");

</script>
</head>
<body>
</body>
</html>
Discovering Diverse Content Through
Random Scribd Documents
Daddy Jake, the Runaway; and Short Stories told
after Dark. By “Uncle Remus” (Joel Chandler Harris). Many
Illustrations. Medium 4to., cloth, gilt edges, 6s. (Uniform with
“The Brownies.”)

When Mother was Little. By S. P. Yorke. Thirteen


Full-page Illustrations by Henry J. Ford. Small square 8vo., cloth,
3s. 6d.

The Butterfly: Its Nature, Development, and Attributes. By


John Stuttard. Dedicated to Sir John Lubbock, Bart. Illustrated.
Fcap. 8vo., limp cloth, 1s.

Æsop’s Fables for Little Readers: Told by Mrs.


Arthur Brookfield. Twenty-five Illustrations by Henry J. Ford.
Small 4to., cloth, 3s. 6d.

“In their present shape, the fables should be very popular among the
inmates of the nursery, more particularly as they are illustrated with nearly
thirty clever drawings by Henry Ford, which are beautifully printed in
monochrome.”—Scottish Leader.

The Brownies: Their Book. By Palmer Cox. Reprinted from


St. Nicholas, with many new Poems and Pictures. Third and
Cheaper Edition. Medium 4to., cloth, gilt edges, 6s.

New Fairy Tales from Brentano. Told in English


by Kate Freiligrath Kroeker, and Pictured by F. Carruthers Gould.
Eight Full-page Coloured Illustrations. Square 8vo., illustrated,
paper boards, cloth back, 5s.; cloth, gilt edges, 6s.

“A really charming collection of stories.”—Pall Mall Gazette.


Fairy Tales from Brentano. Told in English by Kate
Freiligrath Kroeker. Illustrated by F. Carruthers Gould. Popular
Edition. Sq. imp. 16mo., 3s. 6d.

“An admirable translator in Madame Kroeker, and an inimitable illustrator in


Mr. Carruthers Gould.”—Truth.

In the Time of Roses: A Tale of Two Summers. Told


and Illustrated by Florence and Edith Scannell, Author and Artist
of “Sylvia’s Daughters.” Thirty-two Full-page and other
Illustrations. Sq. imp. 16mo., cloth, 5s.

“A very charming story.”—Scotsman.


“A delightful story.”—Punch.

Prince Peerless: A Fairy-Folk Story-Book. By the Hon.


Margaret Collier (Madame Galletti di Cadilhac), Author of “Our
Home by the Adriatic.” Illustrated by the Hon. John Collier. Sq.
imp. 16mo., cloth, 5s.

“Delightful in style and fancy.”—Scotsman.


“A volume of charming stories.”—Saturday Review.

The Bird’s Nest, and other Sermons for Children of all


Ages. By the Rev. Samuel Cox, D.D., Author of “Expositions,” &c.
Cheap and Popular Edition. Imp. 16mo., cloth, 3s. 6d.

“These beautiful discourses were addressed to children of all ages, and


must have found an echo in the hearts of many youthful listeners.”—St.
James’s Gazette.

Arminius Vambéry: His Life and Adventures. Written by


Himself. With Introductory Chapter dedicated to the Boys of
England. Portrait and Seventeen Illustrations. Crown 8vo., 5s.
“We welcome it as one of the best books of travel that our boys could have
possibly placed in their hands.”—Schoolmaster.

Boys’ Own Stories. By Ascott R. Hope, Author of “Stories


of Young Adventurers,” “Stories out of School Time,” &c. Eight
Illustrations. Crown 8vo., cloth, 5s.

“This is a really admirable selection of genuine narrative and history,


treated with discretion and skill by the author. Mr. Hope has not gathered his
stores from the highway, but has explored far afield in less-beaten tracts, as
may be seen in his ‘Adventures of a Ship-boy’ and ‘A Smith among
Savages.’”—Saturday Review.

The Adventures of Robinson Crusoe. Newly


Edited after the Original Editions. Nineteen Illustrations. Large
crown 8vo., cloth extra, 5s.

Two Little Confederates. By Thomas Nelson Page. With


eight full-page illustrations by E. W. Kemble and A. C. Redwood.
Square 8vo., cloth, 6s.

“A charming story.”—American Traveller.


THE CAMEO SERIES.
Half-bound, paper boards, price 3s. 6d. each. Fine Edition, bound in parchment,
printed on Japan paper, numbered and signed, 30 copies only printed, 25
being for sale; terms on application from Booksellers or the Publisher.

1. The Lady from the Sea. By Henrik Ibsen. Translated by


Eleanor Marx-Aveling.

“A powerful study.”—Notes and Queries.

2. A London Plane-Tree, and Other Poems. By Amy Levy.


“True and tender poetry.”—Saturday Review.

3. Wordsworth’s Grave, and Other Poems. By William Watson.


“True, choicely-worded, well-turned quatrains, which succeed each other
like the strong unbroken waves of a full tide.”—Mr. Cosmo Monkhouse in The
Academy.

4. Iphigenia in Delphi, With some Translations from the Greek,


by Richard Garnett, LL.D. Illustrated.

“A very charming volume.... Dr. Garnett has achieved a very interesting and
scholarly piece of work.”—Manchester Guardian.

5. Mireio: A Provencal Poem. By Frederic Mistral. Translated by H.


W. Preston. Frontispiece by Joseph Pennell.

6. Lyrics. Selected from the Works of A. Mary F. Robinson (Mdme.


Jas. Darmesteter). Frontispiece.
[Nearly Ready.

7. Poems of Robert Surtees. Introduction by Edward Peacock.


[In Preparation.

A few copies of the Edition de Luxe of the earlier Volumes in the Series may still
be had. Prices on application.

THE PSEUDONYM LIBRARY.


U nder this title will be published a collection of entirely New
Novels and Romances, neatly printed and tastefully bound. They
will be specially suited by their brightness and originality for holiday
reading.

24mo., cloth, price 1s. 6d. each.

1. Mademoiselle Ixe. By Lanoe Falconer.


[Ready.

2. The Story of Eleanor Lambert. By Magdalen Brooke.


[Nearly Ready.
3. The Mystery of the Campagna; and, a Shadow on a
Wave. By Von Degen.
[In Preparation.

OTHER VOLUMES ARE IN ACTIVE PREPARATION.

London: T. FISHER UNWIN, Paternoster Square, E.C.


Transcriber’s Note:
Words may have multiple spelling variations or inconsistent
hyphenation in the text. These were left unchanged. Obsolete and
alternative spellings were retained. Misspelled words were corrected.
Obvious printing errors, such as backwards, upside down, or partially
printed letters and punctuation, were corrected. Final stops missing
at the end of sentences and abbreviations were added. Duplicate
words at line endings or page breaks were removed. The only
footnote was moved to the end of the chapter.
The following items were changed:

added “of” to ... on both sides of the river ...


added “neither” to ... But neither these manifest dangers ...
changed “haridness” to ... the hardness of his temper.
added unprinted word “have” ... glad to have relinquished ...

For hand-held devices, tap anywhere in the table of prisoners on


trial to open a screen that displays the entire table.
*** END OF THE PROJECT GUTENBERG EBOOK THE BUCCANEERS
AND MAROONERS OF AMERICA ***

Updated editions will replace the previous one—the old editions


will be renamed.

Creating the works from print editions not protected by U.S.


copyright law means that no one owns a United States
copyright in these works, so the Foundation (and you!) can copy
and distribute it in the United States without permission and
without paying copyright royalties. Special rules, set forth in the
General Terms of Use part of this license, apply to copying and
distributing Project Gutenberg™ electronic works to protect the
PROJECT GUTENBERG™ concept and trademark. Project
Gutenberg is a registered trademark, and may not be used if
you charge for an eBook, except by following the terms of the
trademark license, including paying royalties for use of the
Project Gutenberg trademark. If you do not charge anything for
copies of this eBook, complying with the trademark license is
very easy. You may use this eBook for nearly any purpose such
as creation of derivative works, reports, performances and
research. Project Gutenberg eBooks may be modified and
printed and given away—you may do practically ANYTHING in
the United States with eBooks not protected by U.S. copyright
law. Redistribution is subject to the trademark license, especially
commercial redistribution.

START: FULL LICENSE


THE FULL PROJECT GUTENBERG LICENSE
PLEASE READ THIS BEFORE YOU DISTRIBUTE OR USE THIS WORK

To protect the Project Gutenberg™ mission of promoting the


free distribution of electronic works, by using or distributing this
work (or any other work associated in any way with the phrase
“Project Gutenberg”), you agree to comply with all the terms of
the Full Project Gutenberg™ License available with this file or
online at www.gutenberg.org/license.

Section 1. General Terms of Use and


Redistributing Project Gutenberg™
electronic works
1.A. By reading or using any part of this Project Gutenberg™
electronic work, you indicate that you have read, understand,
agree to and accept all the terms of this license and intellectual
property (trademark/copyright) agreement. If you do not agree
to abide by all the terms of this agreement, you must cease
using and return or destroy all copies of Project Gutenberg™
electronic works in your possession. If you paid a fee for
obtaining a copy of or access to a Project Gutenberg™
electronic work and you do not agree to be bound by the terms
of this agreement, you may obtain a refund from the person or
entity to whom you paid the fee as set forth in paragraph 1.E.8.

1.B. “Project Gutenberg” is a registered trademark. It may only


be used on or associated in any way with an electronic work by
people who agree to be bound by the terms of this agreement.
There are a few things that you can do with most Project
Gutenberg™ electronic works even without complying with the
full terms of this agreement. See paragraph 1.C below. There
are a lot of things you can do with Project Gutenberg™
electronic works if you follow the terms of this agreement and
help preserve free future access to Project Gutenberg™
electronic works. See paragraph 1.E below.
1.C. The Project Gutenberg Literary Archive Foundation (“the
Foundation” or PGLAF), owns a compilation copyright in the
collection of Project Gutenberg™ electronic works. Nearly all the
individual works in the collection are in the public domain in the
United States. If an individual work is unprotected by copyright
law in the United States and you are located in the United
States, we do not claim a right to prevent you from copying,
distributing, performing, displaying or creating derivative works
based on the work as long as all references to Project
Gutenberg are removed. Of course, we hope that you will
support the Project Gutenberg™ mission of promoting free
access to electronic works by freely sharing Project Gutenberg™
works in compliance with the terms of this agreement for
keeping the Project Gutenberg™ name associated with the
work. You can easily comply with the terms of this agreement
by keeping this work in the same format with its attached full
Project Gutenberg™ License when you share it without charge
with others.

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. Unless you have removed all references to Project


Gutenberg:

1.E.1. The following sentence, with active links to, or other


immediate access to, the full Project Gutenberg™ License must
appear prominently whenever any copy of a Project
Gutenberg™ work (any work on which the phrase “Project
Gutenberg” appears, or with which the phrase “Project
Gutenberg” is associated) is accessed, displayed, performed,
viewed, copied or distributed:

This eBook is for the use of anyone anywhere in the United


States and most other parts of the world at no cost and
with almost no restrictions whatsoever. You may copy it,
give it away or re-use it under the terms of the Project
Gutenberg License included with this eBook or online at
www.gutenberg.org. If you are not located in the United
States, you will have to check the laws of the country
where you are located before using this eBook.

1.E.2. If an individual Project Gutenberg™ electronic work is


derived from texts not protected by U.S. copyright law (does not
contain a notice indicating that it is posted with permission of
the copyright holder), the work can be copied and distributed to
anyone in the United States without paying any fees or charges.
If you are redistributing or providing access to a work with the
phrase “Project Gutenberg” associated with or appearing on the
work, you must comply either with the requirements of
paragraphs 1.E.1 through 1.E.7 or obtain permission for the use
of the work and the Project Gutenberg™ trademark as set forth
in paragraphs 1.E.8 or 1.E.9.

1.E.3. If an individual Project Gutenberg™ electronic work is


posted with the permission of the copyright holder, your use and
distribution must comply with both paragraphs 1.E.1 through
1.E.7 and any additional terms imposed by the copyright holder.
Additional terms will be linked to the Project Gutenberg™
License for all works posted with the permission of the copyright
holder found at the beginning of this work.

1.E.4. Do not unlink or detach or remove the full Project


Gutenberg™ License terms from this work, or any files
containing a part of this work or any other work associated with
Project Gutenberg™.

1.E.5. Do not copy, display, perform, distribute or redistribute


this electronic work, or any part of this electronic work, without
prominently displaying the sentence set forth in paragraph 1.E.1
with active links or immediate access to the full terms of the
Project Gutenberg™ License.

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.

1.E.7. Do not charge a fee for access to, viewing, displaying,


performing, copying or distributing any Project Gutenberg™
works unless you comply with paragraph 1.E.8 or 1.E.9.

1.E.8. You may charge a reasonable fee for copies of or


providing access to or distributing Project Gutenberg™
electronic works provided that:

• 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 provide a full refund of any money paid by a user who


notifies you in writing (or by e-mail) within 30 days of receipt
that s/he does not agree to the terms of the full Project
Gutenberg™ License. You must require such a user to return
or destroy all copies of the works possessed in a physical
medium and discontinue all use of and all access to other
copies of Project Gutenberg™ works.

• You provide, in accordance with paragraph 1.F.3, a full refund


of any money paid for a work or a replacement copy, if a
defect in the electronic work is discovered and reported to
you within 90 days of receipt of the work.

• You comply with all other terms of this agreement for free
distribution of Project Gutenberg™ works.

1.E.9. If you wish to charge a fee or distribute a Project


Gutenberg™ electronic work or group of works on different
terms than are set forth in this agreement, you must obtain
permission in writing from the Project Gutenberg Literary
Archive Foundation, the manager of the Project Gutenberg™
trademark. Contact the Foundation as set forth in Section 3
below.

1.F.

1.F.1. Project Gutenberg volunteers and employees expend


considerable effort to identify, do copyright research on,
transcribe and proofread works not protected by U.S. copyright
law in creating the Project Gutenberg™ collection. Despite these
efforts, Project Gutenberg™ electronic works, and the medium
on which they may be stored, may contain “Defects,” such as,
but not limited to, incomplete, inaccurate or corrupt data,
transcription errors, a copyright or other intellectual property
infringement, a defective or damaged disk or other medium, a
computer virus, or computer codes that damage or cannot be
read by your equipment.

1.F.2. LIMITED WARRANTY, DISCLAIMER OF DAMAGES - Except


for the “Right of Replacement or Refund” described in
paragraph 1.F.3, the Project Gutenberg Literary Archive
Foundation, the owner of the Project Gutenberg™ trademark,
and any other party distributing a Project Gutenberg™ electronic
work under this agreement, disclaim all liability to you for
damages, costs and expenses, including legal fees. YOU AGREE
THAT YOU HAVE NO REMEDIES FOR NEGLIGENCE, STRICT
LIABILITY, BREACH OF WARRANTY OR BREACH OF CONTRACT
EXCEPT THOSE PROVIDED IN PARAGRAPH 1.F.3. YOU AGREE
THAT THE FOUNDATION, THE TRADEMARK OWNER, AND ANY
DISTRIBUTOR UNDER THIS AGREEMENT WILL NOT BE LIABLE
TO YOU FOR ACTUAL, DIRECT, INDIRECT, CONSEQUENTIAL,
PUNITIVE OR INCIDENTAL DAMAGES EVEN IF YOU GIVE
NOTICE OF THE POSSIBILITY OF SUCH DAMAGE.

1.F.3. LIMITED RIGHT OF REPLACEMENT OR REFUND - If you


discover a defect in this electronic work within 90 days of
receiving it, you can receive a refund of the money (if any) you
paid for it by sending a written explanation to the person you
received the work from. If you received the work on a physical
medium, you must return the medium with your written
explanation. The person or entity that provided you with the
defective work may elect to provide a replacement copy in lieu
of a refund. If you received the work electronically, the person
or entity providing it to you may choose to give you a second
opportunity to receive the work electronically in lieu of a refund.
If the second copy is also defective, you may demand a refund
in writing without further opportunities to fix the problem.

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.

1.F.5. Some states do not allow disclaimers of certain implied


warranties or the exclusion or limitation of certain types of
damages. If any disclaimer or limitation set forth in this
agreement violates the law of the state applicable to this
agreement, the agreement shall be interpreted to make the
maximum disclaimer or limitation permitted by the applicable
state law. The invalidity or unenforceability of any provision of
this agreement shall not void the remaining provisions.

1.F.6. INDEMNITY - You agree to indemnify and hold the


Foundation, the trademark owner, any agent or employee of the
Foundation, anyone providing copies of Project Gutenberg™
electronic works in accordance with this agreement, and any
volunteers associated with the production, promotion and
distribution of Project Gutenberg™ electronic works, harmless
from all liability, costs and expenses, including legal fees, that
arise directly or indirectly from any of the following which you
do or cause to occur: (a) distribution of this or any Project
Gutenberg™ work, (b) alteration, modification, or additions or
deletions to any Project Gutenberg™ work, and (c) any Defect
you cause.

Section 2. Information about the Mission


of Project Gutenberg™
Project Gutenberg™ is synonymous with the free distribution of
electronic works in formats readable by the widest variety of
computers including obsolete, old, middle-aged and new
computers. It exists because of the efforts of hundreds of
volunteers and donations from people in all walks of life.

Volunteers and financial support to provide volunteers with the


assistance they need are critical to reaching Project
Gutenberg™’s goals and ensuring that the Project Gutenberg™
collection will remain freely available for generations to come. In
2001, the Project Gutenberg Literary Archive Foundation was
created to provide a secure and permanent future for Project
Gutenberg™ and future generations. To learn more about the
Project Gutenberg Literary Archive Foundation and how your
efforts and donations can help, see Sections 3 and 4 and the
Foundation information page at www.gutenberg.org.

Section 3. Information about the Project


Gutenberg Literary Archive Foundation
The Project Gutenberg Literary Archive Foundation is a non-
profit 501(c)(3) educational corporation organized under the
laws of the state of Mississippi and granted tax exempt status
by the Internal Revenue Service. The Foundation’s EIN or
federal tax identification number is 64-6221541. Contributions
to the Project Gutenberg Literary Archive Foundation are tax
deductible to the full extent permitted by U.S. federal laws and
your state’s laws.

The Foundation’s business office is located at 809 North 1500


West, Salt Lake City, UT 84116, (801) 596-1887. Email contact
links and up to date contact information can be found at the
Foundation’s website and official page at
www.gutenberg.org/contact
Section 4. Information about Donations to
the Project Gutenberg Literary Archive
Foundation
Project Gutenberg™ depends upon and cannot survive without
widespread public support and donations to carry out its mission
of increasing the number of public domain and licensed works
that can be freely distributed in machine-readable form
accessible by the widest array of equipment including outdated
equipment. Many small donations ($1 to $5,000) are particularly
important to maintaining tax exempt status with the IRS.

The Foundation is committed to complying with the laws


regulating charities and charitable donations in all 50 states of
the United States. Compliance requirements are not uniform
and it takes a considerable effort, much paperwork and many
fees to meet and keep up with these requirements. We do not
solicit donations in locations where we have not received written
confirmation of compliance. To SEND DONATIONS or determine
the status of compliance for any particular state visit
www.gutenberg.org/donate.

While we cannot and do not solicit contributions from states


where we have not met the solicitation requirements, we know
of no prohibition against accepting unsolicited donations from
donors in such states who approach us with offers to donate.

International donations are gratefully accepted, but we cannot


make any statements concerning tax treatment of donations
received from outside the United States. U.S. laws alone swamp
our small staff.

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.

Section 5. General Information About


Project Gutenberg™ electronic works
Professor Michael S. Hart was the originator of the Project
Gutenberg™ concept of a library of electronic works that could
be freely shared with anyone. For forty years, he produced and
distributed Project Gutenberg™ eBooks with only a loose
network of volunteer support.

Project Gutenberg™ eBooks are often created from several


printed editions, all of which are confirmed as not protected by
copyright in the U.S. unless a copyright notice is included. Thus,
we do not necessarily keep eBooks in compliance with any
particular paper edition.

Most people start at our website which has the main PG search
facility: www.gutenberg.org.

This website includes information about Project Gutenberg™,


including how to make donations to the Project Gutenberg
Literary Archive Foundation, how to help produce our new
eBooks, and how to subscribe to our email newsletter to hear
about new eBooks.
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.

Let us accompany you on the journey of exploring knowledge and


personal growth!

ebookfinal.com

You might also like