Before you begin creating HTML data sets,
obtain the necessary files (SpryHTMLDataSet.js and SpryData.js).
TheSpryHTMLDataSet.js file lets you use HTML tables (and other properly
structured code) as your data source; the SpryData.js file contains
the Spry data library.
Link both files to whatever HTML page
you’re creating.
- Download and unzip the Spry ZIP file from the
Adobe Labs website to your hard drive.
- Open the unzipped Spry folder and locate the includes
folder. This folder contains the SpryHTMLDataSet.js and SpryData.js
files necessary for creating HTML data sets.
- Copy the includes folder, and either paste or drag a
copy of it to the root directory of your web site.
Note: If you drag the original includes folder out of the
unzipped Spry folder, the demos in the Spry folder won’t work properly.
- Link the Spry data library files to your web page by
inserting the following script tags within the
page’s head tag:
<script type="text/javascript" src="includes/SpryData.js"></script>
<script type="text/javascript" src="includes/SpryHTMLDataSet.js"></script>
Note: The
exact path of the files varies, depending on where you have them
stored in your website.
When you’ve linked the Spry data
library, you can create a Spry data set.
- Add the Spry name-space declaration to the HTML tag so
that the HTML tag looks as follows:
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:spry="http://ns.adobe.com/spry/">
The
Spry name space declaration is necessary to validate the code anytime
you use a Spry attribute (such as spry:region).
Note: Spry
features work locally as long as the Spry data library files are
linked to your HTML page. To publish the HTML page to a live server,
upload the SpryHTMLDataSet.js and SpryData.js files as dependent
files.