0% found this document useful (0 votes)
3 views41 pages

2418

The document provides a guide on how to load JavaScript arrays with data from a MySQL database using PHP, particularly for creating dynamic web components like resource management systems. It includes code examples for querying employee names and skills, and dynamically building JavaScript arrays based on the retrieved data. The document emphasizes the usefulness of this approach for managing frequently changing data in web applications.

Uploaded by

jabsberget
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
0% found this document useful (0 votes)
3 views41 pages

2418

The document provides a guide on how to load JavaScript arrays with data from a MySQL database using PHP, particularly for creating dynamic web components like resource management systems. It includes code examples for querying employee names and skills, and dynamically building JavaScript arrays based on the retrieved data. The document emphasizes the usefulness of this approach for managing frequently changing data in web applications.

Uploaded by

jabsberget
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/ 41

Explore the full ebook collection and download it now at ebookball.

com

Loading JavaScript Arrays with MySQL Data 1st


edition by Alex Ressi

https://ebookball.com/product/loading-javascript-arrays-
with-mysql-data-1st-edition-by-alex-ressi-14054/

OR CLICK HERE

DOWLOAD EBOOK

Browse and Get More Ebook Downloads Instantly at https://ebookball.com


Click here to visit ebookball.com and download ebookball now
Your digital treasures (PDF, ePub, MOBI) await
Download instantly and pick your perfect format...

Read anywhere, anytime, on any device!

Learning PHP MySQL JavaScript CSS and HTML5 A Step by Step


Guide to Creating Dynamic Websites 3rd Edition by Robin
Nixon ISBN 1491906979 9781491906972
https://ebookball.com/product/learning-php-mysql-javascript-css-and-
html5-a-step-by-step-guide-to-creating-dynamic-websites-3rd-edition-
by-robin-nixon-isbn-1491906979-9781491906972-15996/

ebookball.com

Client Server Web Apps with JavaScript and Java 1st


edition by Casimir Saternos 1449369316 9781449369316

https://ebookball.com/product/client-server-web-apps-with-javascript-
and-java-1st-edition-by-casimir-
saternos-1449369316-9781449369316-20258/

ebookball.com

Learning MySQL Get a Handle on Your Data 1st Edition by


Saied MM Tahaghoghi, Hugh E Williams ISBN 0596529465
9780596529468
https://ebookball.com/product/learning-mysql-get-a-handle-on-your-
data-1st-edition-by-saied-mm-tahaghoghi-hugh-e-williams-
isbn-0596529465-9780596529468-15988/

ebookball.com

JavaScript Data Structures and Algorithms An Introduction


to Understanding and Implementing Core Data Structure and
Algorithm Fundamentals 1st Editon by Sammie Bae ISBN
1484239873 9781484239872
https://ebookball.com/product/javascript-data-structures-and-
algorithms-an-introduction-to-understanding-and-implementing-core-
data-structure-and-algorithm-fundamentals-1st-editon-by-sammie-bae-
isbn-1484239873-9781484239872-15798/
ebookball.com
DNA Arrays Technologies and Experimental Strategies 1st
Edition by Elena Grigorenko ISBN 9781420038859 1420038850

https://ebookball.com/product/dna-arrays-technologies-and-
experimental-strategies-1st-edition-by-elena-grigorenko-
isbn-9781420038859-1420038850-9724/

ebookball.com

LNCS 2832 Efficient Algorithms for the Ring Loading


Problem with Demand Splitting 1st edition by Biing Feng
Wang, Yong Hsian Hsieh, Li Pu Yeh ISBN 3540200649
978-3540200642
https://ebookball.com/product/lncs-2832-efficient-algorithms-for-the-
ring-loading-problem-with-demand-splitting-1st-edition-by-biing-feng-
wang-yong-hsian-hsieh-li-pu-yeh-isbn-3540200649-978-3540200642-13034/

ebookball.com

immediate loading of dental implant 1st edition by


Mithridade Davarpanah,Serge Szmukler 9782912550507
2912550505
https://ebookball.com/product/immediate-loading-of-dental-implant-1st-
edition-by-mithridade-davarpanah-serge-
szmukler-9782912550507-2912550505-7570/

ebookball.com

Automating the Design of Data Mining Algorithms An


Evolutionary Computation Approach 2010th Edition by Gisele
Pappa, Alex Freitas ISBN 3642025402 9783642025402
https://ebookball.com/product/automating-the-design-of-data-mining-
algorithms-an-evolutionary-computation-approach-2010th-edition-by-
gisele-pappa-alex-freitas-isbn-3642025402-9783642025402-9878/

ebookball.com

Analyzing Business Data with Excel 1st edition by Gerald


Knight 9780596553463 0596553463

https://ebookball.com/product/analyzing-business-data-with-excel-1st-
edition-by-gerald-knight-9780596553463-0596553463-12548/

ebookball.com
Loading JavaScript Arrays with MySQL Data
By Alex Ressi

All materials Copyright © 1997−2002 Developer Shed, Inc. except where otherwise noted.
Loading JavaScript Arrays with MySQL Data

Table of Contents
Introduction &Explaination..............................................................................................................................1

Source Reference.................................................................................................................................................6

i
Introduction &Explaination

We have all seen pages that use JavaScript for better or for worse. In many cases JavaScript can improve a
site's functionality and ease of use. Unfortunately administrating some of the complicated arrays that
JavaScript depends on for things like heirarchichal menus and dynamic forms can be a pain in the rear. That's
why were going to turn the task over to PHP and MySQL. We can use this combination to load data into the
JavaScript for us. This is particularly useful if information contained in the array is likely to change.

In this exercise we will build a selection component for a resource management system. The component will
tie people and project together based on staffing needs and employee skill. It will also illustrate how PHP and
MySQL can be used to dynamically build JavaScript. The static component code is below.

Use the drop down menu below to select the skills required for the
project. The list of personnel will change according to skill. Use the
arrows arrows to control the addition or subtraction or people to the
project.

This component uses two popular JavaScripts which are readily avialable on the web. I grabbed the JavaScript
for the 'menu swapper' from www.javascriptsource.com, and I picked up a script to handle the drop down
menu change from www.webreference.com.. With a little time, I managed to get the two scripts to work
together as planned. View the source to see the resulting code. One of the first things you will notice is the
following JavaScript array.

var ar = new Array();

ar[0] = new Array();


ar[0][0] = new makeOption("Crown, Tom", "151");
ar[0][1] = new makeOption("Christiansen, Steve", "221");
ar[0][2] = new makeOption("Berman, Randal", "321");
ar[0][3] = new makeOption("Turok, Steve", "341");
ar[0][4] = new makeOption("Cider, Eric", "361");
ar[0][5] = new makeOption("Bolton, Liz", "421");
ar[1] = new Array();
ar[1][0] = new makeOption("Crown, Tom", "152");
ar[1][1] = new makeOption("Christiansen, Steve", "222");
ar[1][2] = new makeOption("Berman, Randal", "322");
ar[1][3] = new makeOption("Turok, Steve", "342");
ar[1][4] = new makeOption("Cider, Eric", "362");
ar[1][5] = new makeOption("Bolton, Liz", "422");
ar[1][6] = new makeOption("Tuti, Berna", "432");
ar[1][7] = new makeOption("Dong, Enormai ", "442");
ar[2] = new Array();

Introduction & Explainati... 1


Loading JavaScript Arrays with MySQL Data
ar[2][0] = new makeOption("Lindberg, John", "273");
ar[2][1] = new makeOption("Tuti, Berna ", "433");
ar[2][2] = new makeOption("Dong, Enormai", "443");
ar[3] = new Array();
ar[3][0] = new makeOption("Tuti, Berna ", "434");
ar[4] = new Array();
ar[4][0] = new makeOption("Narsysus, Thelma", "306");
ar[5] = new Array();
ar[5][0] = new makeOption("Turok, Steve ", "347");
ar[5][1] = new makeOption("Bolton, Liz ", "427");

The above code will serve as a model while we write our PHP code. Let's take a quick look at the anatomy of
an array. The first set of brackets, ar[x], in this multi−dimentional array refers to the skill. The second set of
brackets ar[x][x] is the array index of the item, which will always begin by default with 0. The item in this
case is the employee. This array will be replaced by PHP code which will dynamcally build it. Now that we
have played around with the component and had a look at the source code, it would be a good idea to build
and populate that database.

Once the database has been built and populated, we need to do the following things to make our JavaScript
dynamic. Note: The only portion of the source code that will be dynamic is the array, the rest of the JavaScript
will remain static.

1. The database needs to be queried for employee names, and employee skills (two separate tables). The
results need to be ordered by skill.
2. We will then need to loop through the skills printing the employee names associated with the skill
3. A mechanism then needs to be built to pass the employee id, skill id and project id to the form
processing component.

Let's begin with the query. Have a look at the database schema to see how the information is stored. There are
3 tables involved in this component. Personnel, Skill, and person_skill.

$db = mysql_connect("localhost", "root", "");


mysql_select_db("extranet",$db);

A link to the database server is established, and the database is selected.

$sql = "SELECT
p.person_id,
s.person_id,
CONCAT(last_name,', ',first_name) AS name,
skill_id";

Introduction & Explainati... 2


Loading JavaScript Arrays with MySQL Data

$sql .= "FROM
personnel p,
person_skill s
WHERE
p.person_id = s.person_id
ORDER BY
skill_id, name";

$result = mysql_query($sql);

The SQL statement is pretty straightforward. If you are unsure about what is going on here, you can always go
to the MySQL site where there are numerous tutorials. The important thing to note in this query is the
ORDER BY clause, which will properly setup the arrangement of the resulting data. After performing our
SQL we then initialize two variables:

$type = "";
$number2 = "0";

We then will perform the while loop which will actually build the JavaScript array.

while ($myrow = mysql_fetch_row($result)) {

A series of "If then" statements will control the proper formation of the array.

if ($myrow[3] != $type) {

The first if statement checks to see if the variable $myrow[3] which is the skill_id from our SQL statement, is
NOT equal to the variable $type. $type was set outside of the loop to nothing. The two values are not equal, so
the next expression will be evaluated.

if ($number2 != NULL) {

Introduction & Explainati... 3


Loading JavaScript Arrays with MySQL Data
$number2, which was initialized outside of the loop with a value of 0 is not equal to NULL, so the code
within the curly braces gets run.

$newnumber2 = ($number2 + "1");


print ("ar[$number2] = new Array();\n");
$number2 = $newnumber2;
$type = $myrow[3];
$number = "0";
}
}

We have a new variable to start with, $newnumber2 which is given a value of 1. (0 + 1 = 1) The first line of
the JavaScript array is then printed. ar[0] = new Array();

$number2 which was initially set to 0, now takes on the value of $newnumber2 which is 1. $type now is given
a value. Initally set with no value and now $type has the value of $myrow[3] which is 0.

print "ar[" . ($number2 − "1") . "]";


if ($number != NULL) {
$newnumber = ($number + "1");
print ("[$number]");
$number = $newnumber;
}

From this code block we get the first part of the next line, namely ar[0][0]. The first '[0]' refers to the skill, so
it will be repeated for each person that is associated with that particular skill. The next '[0]' refers to an
individual possessing the skill. There is an "if statement." that increments the number in the second set of
square brackets for each row in the database.

print (" = new makeOption(\"$myrow[2]\",


\"$myrow[1]$myrow[3]\");\n");
}

Before closing the while loop, we are going to append "= new makeOption("Crown, Tom", "151");" to the
"ar[0][0]", thus completing one pass through the loop. The loop will be run for each row in the database
query, which is in this case is 21. You can view the entire unbroken source code here. The next challenge will
be passing multiple values to the form processing script. This will be done using a combination of JavaScript
and PHP, and will be the focus of a seperate upcoming article.

In addition to building JavaScript arrays, this code can be hacked up for a number of other uses . What this

Introduction & Explainati... 4


Loading JavaScript Arrays with MySQL Data
code essentially does is print the first row of a given field, where rows in the database have fields with
common values. In this example, we initialize an array which represents a given skill, for instance ar[0] = new
Array();. Under that we print all the people in this case that relate to that skill. This can easlily be applied to
something like a classified system. Let's say you are selling automobiles and you would like to print as a
header, the make of the car before listing all the models that fall under it. You could use this code to do the
same. There are many uses for this code. Don't be afraid to try things out. The world is now your oyster,
enjoy.

Introduction & Explainati... 5


Source Reference

Plug this in place of the JavaScript array in the source code of the refering page and go! PHP can be inbeded
in JavaScript tags.

<?php
$db = mysql_connect("localhost", "root", "");
// This establishes a link to MySQL
mysql_select_db("extranet",$db); // The database is specified

$sql = "SELECT
p.person_id,
s.person_id,
CONCAT(last_name,', ',first_name) AS name,
skill_id ";

$sql .= "FROM
personnel p,
person_skill s
WHERE
p.person_id = s.person_id
ORDER BY
skill_id, name";

$result = mysql_query($sql);

$type = "";
$number2 = "0";
while ($myrow = mysql_fetch_row($result)) {
if ($myrow[3] != $type) {
if ($number2 != NULL) {
$newnumber2 = ($number2 + "1");
print ("ar[$number2] = new Array();\n");
$number2 = $newnumber2;
$type = $myrow[3];
$number = "0";
}
}
print "ar[" . ($number2 − "1") . "]";
if ($number != NULL) {
$newnumber = ($number + "1");
print ("[$number]");
$number = $newnumber;
}
print (" = new makeOption(\"$myrow[2]\",
\"$myrow[1]$myrow[3]\");\n");

Source Reference 6
Loading JavaScript Arrays with MySQL Data
}
?>

The drop down menu with skills is also database driven so that new skills can easily be added to the database.
Here is the code that was used to generate it.

<SELECT NAME="industry" onChange="relate(this.form)">


<?
$db = mysql_connect("localhost", "root", "");
mysql_select_db("extranet",$db);

$sql2 = "SELECT DISTINCT


s.skill_id,
p.skill_id,
skill_name ";

$sql2 .= "FROM
skill s,
person_skill p
WHERE
s.skill_id = p.skill_id
ORDER BY
s.skill_id";

$result2 = mysql_query($sql2);

while ($myrow2 = mysql_fetch_row($result2)) {


print ("

The following is the code to build and populate the the tables that are used in this module. It can be cut out of
the web page and then pasted into a text file on your database server where it can then be imported by MySQL
using the mysqlimport command.

#
# Table structure for table 'personnel'
#
CREATE TABLE personnel (
person_id int(11) DEFAULT '0' NOT NULL auto_increment,
first_name varchar(15),
last_name varchar(15),
company varchar(30),
PRIMARY KEY (person_id)
);

Source Reference 7
Loading JavaScript Arrays with MySQL Data
# Dumping data for table 'personnel'
#

INSERT INTO personnel (person_id, last_name, first_name,


company) VALUES (34,'Turok','Steve','1');
INSERT INTO personnel (person_id, last_name, first_name,
company) VALUES (32,'Berman','Randal','1');
INSERT INTO personnel (person_id, last_name, first_name,
company) VALUES (30,' Vi
jaya','Narayanas','1');
INSERT INTO personnel (person_id, last_name, first_name,
company) VALUES (27,' Jo
han','Lindgren','1');
INSERT INTO personnel (person_id, last_name, first_name,
company) VALUES (22,'Christiansen','Steve','1');
INSERT INTO personnel (person_id, last_name, first_name,
company) VALUES (15,'Crown','Tom','1');
INSERT INTO personnel (person_id, first_name, last_name,
company) VALUES (36,'Cider','Eric','1');
INSERT INTO personnel (person_id, first_name, last_name,
company) VALUES (42,'Bolton','Liz','1');
INSERT INTO personnel (person_id, first_name, last_name,
company) VALUES (43,'Tuti','Berna','1');
INSERT INTO personnel (person_id, first_name, last_name,
company) VALUES (44,'Dong','Enormai','1');

#
# Table structure for table 'person_skill'
#
CREATE TABLE person_skill (
person_id int(11) DEFAULT '0' NOT NULL,
skill_id tinyint(2),
level tinyint(1)
);

#
# Dumping data for table 'person_skill'
#

INSERT INTO person_skill (person_id, skill_id, level)


VALUES (15,1,NULL);
INSERT INTO person_skill (person_id, skill_id, level)
VALUES (15,2,NULL);
INSERT INTO person_skill (person_id, skill_id, level)
VALUES (22,1,NULL);
INSERT INTO person_skill (person_id, skill_id, level)
VALUES (22,2,NULL);

Source Reference 8
Loading JavaScript Arrays with MySQL Data
INSERT INTO person_skill (person_id, skill_id, level)
VALUES (27,3,NULL);
INSERT INTO person_skill (person_id, skill_id, level)
VALUES (30,6,NULL);
INSERT INTO person_skill (person_id, skill_id, level)
VALUES (32,1,NULL);
INSERT INTO person_skill (person_id, skill_id, level)
VALUES (32,2,NULL);
INSERT INTO person_skill (person_id, skill_id, level)
VALUES (34,1,NULL);
INSERT INTO person_skill (person_id, skill_id, level)
VALUES (34,2,NULL);
INSERT INTO person_skill (person_id, skill_id, level)
VALUES (34,7,NULL);
INSERT INTO person_skill (person_id, skill_id, level)
VALUES (36,1,NULL);
INSERT INTO person_skill (person_id, skill_id, level)
VALUES (36,2,NULL);
INSERT INTO person_skill (person_id, skill_id, level)
VALUES (42,1,NULL);
INSERT INTO person_skill (person_id, skill_id, level)
VALUES (42,2,NULL);
INSERT INTO person_skill (person_id, skill_id, level)
VALUES (42,7,NULL);
INSERT INTO person_skill (person_id, skill_id, level)
VALUES (43,4,NULL);
INSERT INTO person_skill (person_id, skill_id, level)
VALUES (43,2,NULL);
INSERT INTO person_skill (person_id, skill_id, level)
VALUES (43,3,NULL);
INSERT INTO person_skill (person_id, skill_id, level)
VALUES (44,2,NULL);
INSERT INTO person_skill (person_id, skill_id, level)
VALUES (44,3,NULL);

#
# Table structure for table 'skill'
#
CREATE TABLE skill (
skill_id int(11) DEFAULT '0' NOT NULL auto_increment,
skill_name varchar(20),
skill_desc varchar(250),
PRIMARY KEY (skill_id)
);

#
# Dumping data for table 'skill'
#

Source Reference 9
Loading JavaScript Arrays with MySQL Data
INSERT INTO skill (skill_id, skill_name, skill_desc)
VALUES (6,'Oracle',NULL);
INSERT INTO skill (skill_id, skill_name, skill_desc)
VALUES (5,'ASP',NULL);
INSERT INTO skill (skill_id, skill_name, skill_desc)
VALUES (4,'Cold Fusion',NULL);
INSERT INTO skill (skill_id, skill_name, skill_desc)
VALUES (3,'Vignette',NULL);
INSERT INTO skill (skill_id, skill_name, skill_desc)
VALUES (2,'JavaScript',NULL);
INSERT INTO skill (skill_id, skill_name, skill_desc)
VALUES (1,'HTML',NULL);
INSERT INTO skill (skill_id, skill_name, skill_desc)
VALUES (7,'MySQL',NULL);

Source Reference 10
Another Random Document on
Scribd Without Any Related Topics
autog., 275.
Lenox globe, 14, 212.
Lenox Library, 380.
Leroux, 212.
Lescarbot’s map (1609), 197.
Levett, Christopher, 303, 308, 366.
Levick, J. J., John ap Thomas, etc., 515.
Lewger, John, 528;
autog., 528.
Lewis, Alonzo, History of Lynn, 347.
Lewis, Lawrence, Jr., 488;
Land Titles, 512;
Courts of Pennsylvania, 512
Lewis, William, 531, 555, 556.
Leyden, Pilgrims in, 262;
university, 262, 263;
plan of the town, 263;
Pilgrims leave, 267;
later emigrations from, 276, 277;
H. C. Murphy on the Pilgrims at, 287;
George Sumner on the same, 286.
See Pilgrims.
Libraries in Virginia, 153.
Lightfoot, Bishop, Christian Ministry, 254.
Lil, H. van, on William Penn, 506.
Linn, J. B., 510.
Linschoten, Discours, 205;
portrait, 206.
Lions, 186.
“Little James”, ship, 292.
Little Harbor (New Hampshire), 326.
Livermore, George, 354.
Livingston, William, 411, 453.
Lloyd, Charles, autog., 484.
Lloyd, David, 488.
Lloyd, Lawrence, 466.
Lloyd, Thomas, autog., 494.
Local histories, 363.
Lock, Lars, 494.
Locke, John, and Churchill’s Voyages, 205.
Locke or Lok, Michael, 86;
his map, 39, 205;
fac-simile, 40;
History of West Indies, 47.
Loddington, William, Plantation Work, 496.
Lodge, H. C., Life of George Cabot, 58;
English Colonies, 160;
on the Pocahontas story, 162.
Lodge, Thomas, with Cavendish, 84;
his Margarite of America, 84.
Lodwick, C., 420.
Loe, Thomas, 473, 475.
Log invented, 207.
Logan and Penn correspondence, 506.
Lok. See Locke.
London coast, 90.
London Company, 127.
London Spy, 373.
Longfellow, H. W., Courtship of Miles Standish, 294.
Long Island, 388, 457, 458;
assigned to New York, 391.
Longitude, methods of, 35, 41;
first meridian of, 212, 214.
“Lord Sturton”, ship, 186.
Lorrencourt, 79.
Lotteries, 141; in Virginia, 158.
Lovelace, Francis, governor, 395;
autog., 395;
leaves, 397;
letters, 414.
Lucas, Charters of the Old English Colonies, 153.
Lucas, Nicolas, autog., 430.
Ludlow’s laws (Connecticut), 334.
Ludwell, Thomas, 149.
Lumley’s Inlet, 90.
Lyford, John, 277.
Lygonia, 191, 323, 324.
Lyon, Henry, 437.
Macaulay, T. B., on William Penn, 506;
his views controverted, 506.
Macauley, James, History of New York, 413.
Mace, Captain Samuel, 115.
Mackie, J. M., Life of Samuel Gorton, 378.
Macock, Samuel, 143.
Madison, Isaac, 141, 146.
“Madre de Dios”, ship, 116.
Maffeius, map (1593), 196;
Historiarum Indicarum libri, 196.
Magellan, 66; his straits, 201, 203.
Magin, Histoire Universelle, 184.
Magnetic pole first suggested, 207.
Maine, documentary history, 208;
grants and charters, 209;
province of, 310, 324;
bought by Massachusetts, 320, 324;
her history, 321;
patents, 321;
Massachusetts again in possession, 325;
authorities on the history of, 363;
origin of name, 363;
patent to Gorges, 363;
royal charter, 363;
records, 363, 364;
royal commissioners in, 325, 363;
histories of, 364;
bibliography of, 209, 365;
map of the coast, 190;
English on the coast, 193.
See Gorges, Norumbega, Pemaquid, Popham.
Maine Historical Society, 208;
Collections, 365.
Major, R. H., 191;
on Cabot’s voyage, 45.
Malabar, Cape, 382, 383.
Malectites, 382.
Malignants, 147.
Man, Abraham, 488.
Manchese, 110, 111.
Mangi, sea, 67, 68;
region, 68.
Manning, Captain, 397.
Manoa, 117.
Manomet, 272.
Manor of Frank (Pennsylvania), 482.
Manteo, 110, 111, 114.
Manufactures in Virginia, 166;
in New England, 316.
Marco, Cape, 101.
“Maria”, ship, 95.
Mariana, 367.
“Marigold”, ship, 65, 187.
Mariner’s Mirrour, 207.
Markham, A. H., Voyages of John Davis, 99.
Markham, C. R., 79;
Voyages of Baffin, 99.
Markham, William, 478;
letters, 497.
Maroons, 65.
Marriage, first, in Virginia, 132.
Marshall, O. H., on the charters of New York, 414;
on Denonville’s expedition, 415.
Marsillac, J., Vie de Penn, 506.
Marston, Eastward ho!, 128.
Martha’s Vineyard, 180.
Martin, John, 128, 137, 143, 146.
Martin, J. H., Chester and its Vicinity, 510.
Martin, Gazetteer of Virginia, 165.
Martin Mar-Prelate Tracts, 237, 238.
Martindale, J. C., Byberry and Moreland, 509.
Marvin, W. T. R., edits the New England’s Jonas, 355.
Mary, Queen, autog., 7.
“Mary and John”, ship, 176.
“Mary of Guilford”, ship, 170, 185, 186.
Maryland, history of, 517;
charter, 517;
name of, 520;
bounds, 520;
powers of the Proprietors, 520, 521;
rights of the settlers, 522;
controversy with Virginia, 522, 528;
Jesuit missions, 523, 554;
the charter’s significance of toleration, 523, 530, 562;
map of, 465, 525;
colonists arrive, 526;
early assemblies, 527, 528, 530, 531;
struggle of colonists with the Proprietor, 529;
Ingle’s usurpation, 532;
overthrown, 532;
Toleration Act, 534, 541, 555, 560;
passed by Catholics, 534;
indorsement of, 535;
Puritan settlers, 535;
two houses of the Assembly formed, 536;
commissioners’ demands, 537;
second conquest, 538;
victory of the Puritans of Providence, 539;
the Proprietor reinstated, 541;
population, 543;
coinage, 543;
boundary disputes with Pennsylvania, 478, 488, 489, 548;
writ of quo warranto against the charter, 550;
Coode’s “Association”, 551;
proprietary government ends, 552;
a royal province, 553;
sources of its history, 553;
Relation (of 1634), 553;
(of 1635), 553;
letters of Jesuit missionaries, 553;
map, 553;
boundary disputes with Virginia, 554;
battle of Providence, authorities on, 554;
archives of the State, 555-557;
laws, 529, 556, 557, 562;
calendar of State papers, 556;
loss of records, 557;
documents in State-Paper Office in London, 557;
index to them, 557;
other manuscript sources, 557;
histories, 559;
seal of the colony, 559;
proportion of Catholics, 560;
the question of toleration discussed, 561;
source of charter, 561;
bibliography of, 561;
local histories, 561.
See Calvert, Kent Island, etc.
Maryland Historical Society, 562; publications, 562.
Mason, Charles, autog., 489.
Mason, Captain John, of New Hampshire, on the Maine coast, 193;
his will, 367;
grant of Laconia, 308, 327, 328;
vice-president of Council for New England, 309;
grant of New Hampshire, 310, 367;
his grants, 329;
autog., 364;
dies, 328;
memoir by C. W. Tuttle, 364.
Mason, John, of Connecticut, in Pequot war, 348;
autog., 348;
his narrative, 349.
Mason, Robert Tufton, 329, 367.
Mason and Dixon’s line, 489, 514, 515.
Massa, 104.
Massachusetts, 310;
early meant Boston Harbor, 179, 183;
patent, 309, 310, 342;
charter, 311, 342, 343;
government of, 312;
objects of the founders, 312;
charter attacked, 313;
charter concealed, 318;
her relations with the other colonies, 316;
buys the patent of Maine, 320, 364;
writ of quo warranto against the charter, 321;
origin of name of, 342;
authorities for its history, 342;
government transferred to the soil, 343;
archives of, 343;
records printed, 343, 359;
manuscripts elsewhere, 343;
histories of, 344;
laws of, 314, 349-351, 373;
struggle to maintain its charter, 362;
authorities on the struggle, 362;
bibliography of, 363;
claims westward to the Pacific, 396;
claim to lands west of the Hudson, 405.
See New England.
Massachusetts Company, 342, 343.
Massachusetts Historical Society, archives of, 343;
publications, 343;
Collections, 343;
Proceedings, 343.
Massachusetts Mount, 342.
See Blue Hills.
Massachusetts River, 342.
Masson, Life of Milton, 245.
Massonia, 367.
Massasoit, 274, 282;
his family, 290.
Mataoka. See Pocahontas.
Mather, Cotton, autog., 319;
his library, 345;
Ecclesiastical History of New England, or Magnalia, 240, 283, 345;
portrait, 345;
Diary, 345;
Parentator, 345;
on the Wheelwright deed, 367;
map of New England, 345, 384;
forged letter of, 502.
Mather, Increase, Relation of the Troubles, 340, 361;
Brief History of the War, 361.
Mather, Richard, 255, 350.
Mather Papers, 374.
Matowack, 388.
Matthews, Samuel, 149.
Mattson, Margaret, 488.
Maverick, Samuel, 360;
autog., 311, 388;
controversy with Massachusetts, 354.
Mavooshen, 363.
Maxwell’s Virginia Historical Register, 168.
May, Dorothy, autog., 268.
May’s Arctic expedition, 104.
Mayer, Brantz, 533, 559, 562;
Calvert and Penn, 507.
Mayer, Lewis, 557, 562.
“Mayflower”, ship, 267;
passengers on, 267, 292;
their autographs, 268;
last survivor, 271;
passengers, origin of, 284;
her history, 290.
See Pilgrims, Jones.
Maynarde, Thomas, 82.
McCall, Peter, 512.
McCamant, Thomas, 510.
McCormick, S. J., 372.
McDonald, Colonel A. W., his report on Virginia bounds, 159.
McMahon, J. V. L., History of Maryland, 559.
McSherry, James, History of Maryland, 560.
McSherry, Richard, 560;
Essays and Lectures, 560.
Meade, Old Churches and Families of Virginia, 160.
Medina, Arte de Navegar, 207.
Meeting-houses, old, in New England, 319.
Megiser, Septentrio novantiquus, 104.
Melton, Edward, Zee- en Landreizen, 419.
Mendocino, Cape, 74-76, 80.
Menzies Catalogue, passim.
Mennonites, 251, 479, 490.
Mercator, Gerard, his engraved gores of a globe, 214;
Hondy’s edition, 167, 381;
his projection improved by Wright, 208.
Merchant adventurers, 266.
Merlan, J. E. V., 491.
“Mermaid”, ship, 89.
Merrill, James C., 353.
Merry Mount, 278.
Metacomet, 282.
Meta Incognita, 86, 89, 91.
Meusel, Bibliotheca Historica, 124.
Mew, Richard, 435.
Mexico, press in, 350.
Mey, Cornelius Jacobsen, 422.
Miantonomo, 368.
“Michael”, ship, 86.
Michener, Ezra, Early Quakerism, 505.
Mickle, Isaac, Old Gloucester, 456.
Middletown (New Jersey), 424, 427.
Milford (Connecticut), 333.
Millard, F. J., 104.
Millenary petition, 239.
Miller, J., Description of New York, 420.
Millet, Father, his Relation, 415.
“Minion”, ship, 64.
Minot, G. R., History of Massachusetts, 344.
Mint in Boston, 316;
illegal, 320;
in Maryland, 543;
in New Jersey, 447.
Mitchell, Jonathan, 360.
M’Kinney and Hall, Indian Tribes, 163.
Mohawks, 394, 396;
friendship with, 400;
French expeditions against, 415.
See Iroquois.
Mohegan case, 349.
Molineaux, Emeric, map, 44, 46, 77, 91, 99, 197, 216, 217;
of California coast, 80;
his globe, 90, 196, 205, 207, 208, 212, 213.
Moll, Herman, his maps, 345.
Moluccas, 48;
discovered, 68.
Monardes, Joyfull Newes, 204.
Mondidier Catalogue, 348.
Monhegan, 176, 178, 179, 181-183, 190, 191, 321.
Monmouth patent, 426.
Montanus, Arnoldus, De Nieuwe Weereld, 184, 416;
map of New York, 381, 417.
Monterey, 74, 75.
Montreal (Mont Royal), 213.
See Hochelaga.
Moody, Joshua, autog., 319.
“Moonshine”, ship, 89.
Moore, George H., 368;
on Poole’s edition of Johnson’s Wonder-working Providence, 358.
Moore, J. B., 367;
Governors of New England, 289.
Moore, John, 488.
Moorhead, Sarah, portrait of Cotton Mather, 345.
Mooshausic, 377.
Moravians’ (Bethlehem) library, 500.
Morden, Robert, map of New England, 384.
More, Caleb, 360.
More, Nicholas, 482, 486, 488, 494, 497;
autog., 484;
Letter from Dr. More, 500.
Moreland, manor of, 482.
Morris, Caspar, 515.
Morris, J. G., Lord Baltimore, 559;
Bibliography of Maryland, 561.
Morris, Colonel Lewis, 436.
Morrison, Francis, 148, 149, 152.
Morton, Charles, autog., 319.
Morton, George, 290.
Morton, Nathaniel, 283;
New England’s Memorial, 283, 291, 359;
autog., 291.
Morton, Thomas, 278, 309, 322;
New English Canaan, 348;
edited by C. F. Adams, Jr., 348.
Mount Desert, 178, 179, 190, 194, 382, 383.
Mount Wollaston, 311.
Mountfield, D., The Church and Puritans, 253.
Moulton, J. W., New York One Hundred and Seventy Years Ago, 416.
Mourt’s Relation, 288, 289;
its authorship, 290.
Mudie, David, 443.
Mulford, I. S., History of New Jersey, 455.
Muller, Frederick, Catalogue of American Portraits, 416;
Books on America, passim.
Muller, Geschiedenis der noord Compagnie, 98.
Muller, History of Doncaster, 102.
Munsell, Joel, 372.
Munster, or Münster, Sebastian, Cosmographia, 27, 36, 199, 200;
map (1532), 199, 201;
edits Grynæus and Ptolemy, 199;
in English by Eden, 200, 201;
map (1540), 201, 217.
Murphy, H. C., Henry Hudson in Holland, 104;
Verrazzano, 214;
on the Pilgrims in Leyden, 287;
and Milet’s captivity, 415;
edits Danker’s Journal, 420.
Muscongus, 191.
Muscovy Company, 6, 46, 103.
Myritius, Johannes, Opusculum Geographicum, 10.
“Nachen”, ship, 181.
Nancy globe, 214.
Nantasket, 311.
Nantucket, 382.
Napier, Lord Bacon and Ralegh, 126.
Narragansett country, Connecticut’s claim, 335, 339;
settled, 336;
Massachusetts proprietors of, 338;
townships, 361;
histories of, 376;
patent, 379.
See Rhode Island.
Narragansett Club, 377.
Narragansett Historical Register, 381.
Narragansetts, 382.
Naumkeag, 311.
See Salem.
Naunton, Sir Robert, 265.
Navigation, early books on, 206.
Navigation Act, 150, 386, 387, 400, 415, 544.
Nead, B. M., 510.
Neal, Daniel, History of the Puritans, 250;
History of New England, 345;
its map, 345.
Neale, Walter, 327, 328;
autog., 363.
Needle, variation of, 9, 23, 41.
Nehantic country, 371.
Neill, E. D., his Virginia and Virginiola, 154;
Notes on the Virginia Colonial Clergy, 157;
History of the Virginia Company of London, 158, 288, 340;
English Colonization in America, 155, 158, 288, 561;
his notes on Virginia history, 158, 160, 162, 163, 166;
on Sir Edmund Plowden, 457;
on Robert Evelyn, 459;
Francis Howgill, 505;
Light thrown by the Jesuits, etc., 554;
Terra Mariæ, 560;
Lord Baltimore and Toleration, 560;
Founders of Maryland, 560;
Maryland not a Roman Catholic Colony, 561.
Nelson, Captain, at Jamestown, 131.
Nelson, William, History of Passaic County, 456.
Nelson River, 93.
“Neptune”, ship, 142.
Nevada, 67.
Nevada River, 101.
Nevill, James, 441.
Nevill, Samuel, 454.
New Albion (Drake’s), 80;
under “Caput Draconis”, 69, 72.
New Albion (Plowden’s), 457;
bounds, 458, 463;
medal and ribbon of the Albion knights, 461, 462.
See Plowden.
New Amsterdam surrenders to the English, 389, 421;
first reports of, 414;
burghers take the oath, 414;
early views, 415.
See New York.
New Cæsaria. See Nova Cæsaria.
New England, name first given, 198;
thought to be an island, 197;
Cartography, 194, 381, 382, 383;
Dudley’s map, 303;
Paskaart, 333;
Mather’s map, 345;
Confederation (of 1643), 281, 315, 334, 338, 354;
its records, 373;
religious element in, 219;
sources of her history, 340;
relations with the Dutch, 375;
dominion extends to the Pacific, 409;
Andros seal, 410;
bounds as allowed by the French, 456;
Council for, 295;
their Briefe Relation, 296;
patent, 297;
seal, 341, 342;
Platform, 302;
records, 301, 308, 340;
partition the coast, 305;
grants, 308, 340;
surrenders patent, 309;
authorities on, 340.
New England Almanac, 384.
New England Historic Genealogical Society, 344.
New England Historical and Genealogical Register, 344.
New England Society of New York, 293.
New England’s First Fruits, 355.
New France, 101.
New Haarlem, 390.
New Hampshire, grant of, 310;
history of, 326;
submits to Massachusetts, 327, 329;
name first used, 329, 367;
Provincial Papers, 363, 367;
sources of her history, 366;
Wheelwright deed, 366;
patents, 367;
map (1653), 367;
laws, 367;
histories of, 368;
local histories, 368;
bibliography, 368.
New Hampshire Historical Society Collections, 367.
New Haven, 310, 368;
founded, 332, 371;
united to Connecticut, 334;
fundamental articles in original Constitution, 371;
laws, 371;
Blue Laws, 371;
charter of union with Connecticut, 373;
Records, 371, 375;
histories of, 375;
maritime interests, 375.
See Connecticut.
New Haven Historical Society Papers, 375.
New Interlude, 199.
New Jersey, grants of, 392;
boundary disputes, 406;
named, 422, 423;
Concessions, etc., 423, 425, 426, 427;
government, 423;
earliest Assembly, 425;
lords proprietors, 428;
laws, 429, 447;
quintipartite deed, 431;
under Andros’ government, 444;
attempt to run the line between East and West Jersey, 445;
Planter’s Speech, etc., 449;
sources of its history, 449;
counties and towns, 446;
churches in, 447;
education in, 447;
coinage in, 447, 448;
early tracts on, 453;
histories of, 453, 455;
Archives, 454;
map by Van der Donck, 455;
efforts to complete its archives, 455;
Chalmers papers on its history, 455;
Testimonys from the Inhabitants, 476.
See East and West Jersey.
New Jersey Historical Society, 454, 455.
New London (Connecticut), 375.
New Netherland, relations with New England, 375;
taken by the English, 385;
capture contemplated by Cromwell, 386;
bounds of, 456.
See Dutch, New York.
New Plymouth, 276.
See Plymouth.
New Scotland, 306.
New Somerset, 322, 363;
records, 363.
New Sweden, 456, 465;
surrenders to the Dutch, 422.
New York (city), 405, 407;
view of the Strand, 417;
Stadthuys, 419, 420;
Water-gate, 420;
first named, 390;
taken by the Dutch, 397, 415, 429;
restored to the English, 398;
government, 414;
early views, 415;
maps, 417, 418;
its history, 415.
See New Amsterdam.
New York (province), described (in 1678), 400;
boundary disputes with Connecticut, 405;
sources of its history, 411;
under English rule, 385;
charter of liberties, 404;
charter of franchises, 405;
annexed to New England under Andros, 409;
histories of, 411;
literature of disputed boundaries, 414;
charters, 414;
seals, 415;
maps, 417;
descriptions, 419.
See New Netherland.
Newark (New Jersey), 425;
history of, 456.
Newbie, Mark, 441, 448.
Newce, Thomas, 144.
Newfoundland, 519.
See Avalon, Baccalaos.
Newichwaneck, 327, 328.
Newport, Captain Christopher, 128, 132, 133, 139;
his discoveries, 154.
Newport (Rhode Island), founded, 336, 338.
Newport-Historical Magazine, 381.
Newport-News, origin of the name, 154.
Nicholas, Thomas, his Pleasant History, 204, 205;
his Peru, 204.
Nicholls, Richard, 389;
killed, 396;
autog., 388. 421.
Nichols, Philip, 83.
Nichols, Dr. William, Doctrine of the Church of England, 248.
Nicholson, Francis, 444.
Nicholson, Joseph, autog., 314.
Niles, T. M., 376
Noble, George, 457.
Noddle’s Island, 311.
Nombre de Dios, 65.
Nonconformists, 219, 223.
See Dissenters, Separatists.
Norman, Robert, Newe Attractive, 207, 208;
Safeguard of Saylers, 207.
Norris, J. S., 555; Early Friends in Maryland, 505.
North, J. W., History of Augusta, 365.
North Carolina, Indians of, 109;
map of, by John White, 124.
Northeast Passage, 6, 30.
“North Star”, ship, 90.
Northwest explorations, 85;
Passage, 203.
See Arctic.
Northwest Territory, Virginia’s claims to, 153.
Norton, Francis, 328.
Norton, John, Discussion of the Suffering of Christ, 357;
autog., 358;
Heart of New England Rent, 358.
Norton, Literary Gazette, 205.
Norumbega, 101, 188;
its English explorers, 169;
bounds, 169;
meaning of the name, 184;
authorities, 184;
varieties of the name, 195, 214.
See Arembec, Maine
Norwich (Connecticut), 375.
Norwood, Colonel Henry, 148.
Norwood, Voyage to Virginia, 157.
Notley, Thomas, 547.
Nova Albion, 42.
See New Albion.
Nova Britannia (Virginia), 155, 156, 199.
Nova Cæsaria, 422.
See New Jersey.
Nova Francia. See New France.
Nova Scotia, 299.
Oakwood Press, 500.
O’Callaghan, E. B., on New York history, 414;
New Netherland, 415;
edits Wooley’s Journal, 420;
his Catalogue, passim.
Ocracoke Inlet, 111.
Ogden, John, 429.
Ogilby, John, America, 167, 184, 360, 416;
map of New York, 417;
map of New England, 381.
Oiseaux, Isle des, 213.
Olaus Magnus, 101.
Old Colony Club, 293.
Old Colony Historical Society, 291, 344.
“Old Dominion”, name of, 153.
Oldham, John, 303.
Oldmixon, John, British Empire in America, 345, 499, 502.
Oldys, William, Life of Bacon, 121;
British Librarian, 205.
Olive, Thomas, 441.
Onderdonk, Henry, Jr., Annals of Hempstead, 505.
Opecancanough, 131.
Orcutt and Beadsley, History of Derby, 375.
Oregon coast, 68.
Orinoco River, 117;
valley, map, 124.
Orleans, Isle of, 213.
Ortelius’s map in Hakluyt, 205;
Theatrum orbis terrarum, 34.
Oswego, 411.
Otten’s map of New York, 417.
Oviedo, Historia de las Indias, 49.
Oxford Tract, 156.
Oxford Voyages, 79.
Pacific, passages to the, 183, 459;
called Mare del Sur, 203.
See South Sea.
Pack, Roger, 457.
Paget, John, Inquiry, etc., 506.
Paine, John, autog., 338.
Palfrey, John G., his interest in Pilgrim history, 284;
History of New England, 293, 344, 375, 376.
Palmer, W. P., 161.
Palmer’s Island, 522, 528.
Pamunkey Indians, 131.
Paper manufacture in Pennsylvania, 493.
Parias, 201, 215.
Parmenius, 171, 187.
Partridge, Ralph, 280.
Paschall, Thomas, 499.
“Pasha”, ship, 65.
Passao, island, 79.
Passe, Simon, 212.
Patterson, James W., 210.
Pastorius, F. D., 491, 515;
Beschreibung, etc., 502.
“Patience”, ship, 136.
Patowomekes, 135.
Patuxet, 273.
Pavonia, 422.
Payne, Elizabethan Seamen, 78, 187.
Peabody, George, 557, 562.
Pearls sought for on the New England coast, 181.
Pearson, Peter, 358;
autog., 314.
Pease, J. C., 376.
Peckard, Peter, Memoir of Nicholas Ferrar, 158.
Peckham, Sir George, 39, 196;
his True Report, 187, 205.
Peirce, E. W., Indian History, etc., 290;
Civil Lists, etc., 293.
Peirce, James, Vindication of the Dissenters, 248.
Peirce, John, 269, 275, 299, 301, 341.
Peirce, William, Almanac, 350.
Pejepscot patent, 324.
Pelham, Peter, 345.
“Pelican”, Drake’s ship, 65;
broken up, 73.
Pemaquid, 190, 191, 193, 365, 382, 400, 407;
Popham at, 176;
map, 177;
settled, 321;
Papers, 365;
books on, 365;
purchased by Duke of York, 325, 388;
grant of, 399.
See Maine.
Pembroke, Earl of, 64, 86.
Pemisapan, 112.
Penhallow, Indian Wars, 349.
Penington, John, on New Albion, 461.
Penn, Granville, Sir William Penn, 506.
Penn, Hannah, 514.
Penn, Richard, 514.
Penn, William, intervenes in New Jersey disputes, 430, 432;
purchases Carteret’s interest in Jersey, 435;
his Letter (printed in 1683), 498, 499;
Further Account, 500;
Sir W. Popple’s Letter to Penn, 502;
alleged plot to capture him, 502;
Brief Account, etc., of the Quakers, 496, 503;
Primitive Christianity Revived, 503;
his Works, 505;
lives of, 505, 506;
connection with Algernon or Henry Sidney, 506;
Papers, 506, 507;
Apology, 506;
correspondence with Logan, 506;
his family, 507;
travels in Holland, 507;
deeds, grants, letters, etc., 507;
his career, 473;
portraits, 474, 475;
autog., 474, 484;
his burial-place, 475;
No Cross, no Crown, 475;
Great Case of Liberty of Conscience, 475;
interest in West Jersey, 476;
petitions for land east of the Delaware, 476;
charter granted, 477
Some Account, etc., 478, 479, 495, 496;
arrives in America, 480, 482;
Letitia Cottage, 483;
at Shackamaxon, 490, 513;
Welcome to Our Bookstore - The Ultimate Destination for Book Lovers
Are you passionate about books and eager to explore new worlds of
knowledge? At our website, we offer a vast collection of books that
cater to every interest and age group. From classic literature to
specialized publications, self-help books, and children’s stories, we
have it all! Each book is a gateway to new adventures, helping you
expand your knowledge and nourish your soul
Experience Convenient and Enjoyable Book Shopping Our website is more
than just an online bookstore—it’s a bridge connecting readers to the
timeless values of culture and wisdom. With a sleek and user-friendly
interface and a smart search system, you can find your favorite books
quickly and easily. Enjoy special promotions, fast home delivery, and
a seamless shopping experience that saves you time and enhances your
love for reading.
Let us accompany you on the journey of exploring knowledge and
personal growth!

ebookball.com

You might also like