Graphics Programs Reference
In-Depth Information
Adding a Spry Data Set
You can add dynamic interactivity to Web pages with Spry data sets. A Spry data set is a
JavaScript that acts as a virtual holding container for data that loads from another, sepa-
rate source document, which can be a page in the current site or another XML or HTML
fi le. This process is similar to displaying data from a database. The data that appears is
dependent on user input and updates without having to refresh the page in the browser.
In other words, a Spry data set displays data from an XML or HTML source fi le that the
user requested. After you create a data set and specify what information it contains, you
set what part of the data will be displayed in the Web page and what user interaction
triggers the display of additional data. The possibilities for how the data set information
can be displayed are extensive.
For example, you will create a Spry data set in the home page of the NextBest Fest
site. The schedule.html page will be the outside source document. The satellite stage
table in the schedule.html page will be the container from which the data set gets its
data. The data set is then a virtual container that holds all the information from the satel-
lite stage table in the schedule.html page. This does not affect the way the table is dis-
played in the schedule.html page. You will display the information from the time column
of the data set in the home page and you will create interactivity that enables the user
to click a time to open a div that displays the name and information for the band that is
scheduled to play at that time.
Teamwork: Reusing Content and Adding Interactivity with Spry Data Sets
Spry data sets allow you to display the same information in multiple pages of a site with-
out re-creating that information. Using techniques like this enables you to avoid the work
of entering and later updating the same content in many pages. By modifying the source
document—in this case, the satellite stage table in the schedule.html page—you automati-
cally update that content in the Spry data sets in which it appears. You can use the same
information in a variety of ways within the site. It is important to consider the productiv-
ity of the entire team, including the members who will maintain the site, when creating a
Web site. Using time saving techniques to repurpose content enables you to create a more
dynamic site with less work.
Spry data sets also add interactivity to the pages. This means that users must interact
with the pages, making them more involved with the site. In addition, you can provide a lot
of information in a smaller space without cluttering the page layout.
Like all Spry elements, each Spry data set consists of three components: the container,
the behavior, and the styling. You customize the styling applied to the display created
from the data set by customizing the style sheet that is created for each Spry data set.
The Help system provides more about Spry data sets.
To research Spry data sets:
1. If you took a break after the previous session, make sure the NextBest Fest site
is open, the workspace is reset to the Designer configuration, and the index.html
page is open in Design view.
2. On the Application bar, click Help , and then click Dreamweaver Help . Use your
Adobe Dreamweaver CS5, log in, if necessary; Help opens in a browser window.
3. Expand the Building Spry pages visually list, expand the Displaying data with
Spry list, and then click the About Spry data sets link. The page opens in the
right pane of the page.
Search WWH ::




Custom Search