Developer’s Guide

Table Of Contents
Using FileMaker Pro XML to deliver your data
7-17
function nextRecord( )
{
if (foundSet.nextRecord( ))
populateFields( );
}
function previousRecord( )
{
if (foundSet.previousRecord( ))
populateFields( );
}
function populateFields( )
{
document.getElementsByName(“Name”) . item(0) . value =
foundSet.getFieldByName (“Name”);
document.getElementsByName(“Title”) . item(0) . value =
foundSet.getFieldByName (“Title”);
document.getElementsByName(“Phone”) . item(0) . value =
foundSet.getFieldByName (“Phone”);
document.getElementsByName(“Picture”) . item(0) . src =
foundSet.getFieldByName (“Picture”);
}
Looking at the XML Inventory example
The XML Inventory example is a demonstration of a web-published
database that uses the FMPXMLRESULT and FMPXMLLAYOUT
grammars and Dynamic HTML (including JavaScript and the W3C
Document Object Model) to display the XML data on the Web.
This example was designed to be viewed in the Internet Explorer 5.0
for Windows web browser. For information on new browsers that
can be used to view the example, double-click FileMaker on the Web
(installed in the FileMaker Developer 5 folder) to go to the
FileMaker Developer product support pages in your browser.
The example uses an inventory database for office equipment and
provides two methods for displaying records from the database—in
a list or in a detailed view of each record. Web site visitors can switch
between List View and Detail View, and add, edit, delete, or find
records in the database.
The XML Inventory example includes:
1 a text file containing the JavaScript library used for this
demonstration, named FMP.js
1 the Inventory.fp5 database
1 HTML files for viewing, searching, and adding records to the
database
The Inventory.fp5 database used in the XML Inventory example