Developer’s Guide

Table Of Contents
Publishing your database on the Web 8-7
About the FileMaker WebPortal object
With the Web Companion in FileMaker Pro, you can access the
elements of the Instant Web Publishing home page (such as database
names or the URL to access a Form View of a database) as separate
JavaScript objects and extract data from them to build your own custom
home page.
To access elements of the Instant Web Publishing home page, you
need the following FileMaker CGI request:
<SCRIPT LANGUAGE="JavaScript" SRC="FMPro?-webportal">
</SCRIPT>
Note If you are using a Netscape web browser, you must specify
JavaScript 1.4.
This HTML statement places the JavaScript object called WebPortal
inside a window object in your web page. The window.webPortal
object contains the following subobjects:
webPortal.databases = Array of <databaseObject>
webPortal.userName = Name of current FileMaker Pro user
Each <databaseObject> in the array contains the following:
databaseName The string displayed for the link in the Instant Web
Publishing home page
defaultURL The default URL for opening the database in the browser
based on settings made in the Web Companion View
Setup dialog box or the Document Preferences dialog box
formViewURL The URL for opening the database in the Form View
instant web page
tableViewURL The URL for opening the database in the Table View
instant web page
searchViewURL The URL for opening the database in the Search View
instant web page
newViewURL The URL for opening the database in the New Record
View instant web page
Note A URL for the default Form View for a database can be used
with FileMaker WebPortal objects.
A Custom Web Portal example with commented code is included in
the Custom Workgroup Portal folder on the FileMaker Developer
CD.
Overview of setting up a custom home page for Instant
Web Publishing
To create a custom home page using JavaScript:
1. Create an HTML file for your web page using a text editor or
HTML editing program.
2. Include a FileMaker CGI request for the FileMaker WebPortal
object:
<SCRIPT LANGUAGE="JavaScript" SRC="FMPro?-webportal">
</SCRIPT>
3. As desired, use scripting to write HTML and text to the document.
4. Save the file with the .htm or .html filename extension and place
it in the root level of the Web folder (inside the FileMaker Developer
folder).
5. In the Web Companion Configuration dialog box, select Enable
Instant Web Publishing, choose your custom web page from the Home
Page list, and click OK.
Creating a custom web site using a
database layout
Features in FileMaker Pro 6 enable you to design your own page
layouts for Instant Web Publishing in Layout mode, and then display
the layouts in the web browser.