Instant Web Publishing Guide

Table Of Contents
Chapter 4
|
Designing a database for Instant Web Publishing 35
1 If your scripts contain steps that are unsupported, for example, steps that are not web-compatible, use the
Allow User Abort script step to determine how subsequent steps are handled.
1 If the Allow User Abort script step option is enabled (On), unsupported script steps will stop the script
from continuing.
1 If the Allow User Abort script step is set to Off, (default), unsupported script steps are skipped over
and the script continues to execute.
1 If this script step is not included, scripts are executed as if the feature is enabled, so unsupported script
steps will stop scripts.
1 Some scripts that work with one step from a FileMaker Pro client may require an additional Commit
Records/Requests step to save the data to the host. Because web users don’t have a direct connection to
the host, they aren’t notified when data changes. For example, features like conditional value lists aren’t
as responsive for web clients because the data must be saved to the host before the effects are seen in the
value list field.
1 Similarly, any script that modifies data should include the Commit Records/Requests step, because all
data changes aren’t visible in the browser until the data is saved, or “submitted” to the server. This
includes script steps such as Insert Text, Insert Calculated Result, Insert from Last Visited, Insert Current
Date, Insert Current Time, Cut, Insert Copy, Copy Record/Request, Copy All Records/Requests, and
Paste. Many single-step buttons should be converted into scripted buttons to include the Commit
Records/Requests step. When you design scripts that are executed from a web browser, it’s a good idea
to include the Commit Records/Requests step at the end of a script to make sure all changes are saved.
1 To create conditional scripts based on the type of client, use the Get(ApplicationVersion) function. If the
value returned includes FileMaker Web Publishing you know that the current user is accessing your
database with Instant Web Publishing. For more information on functions, see FileMaker
Pro Help.
1 Because there are intermediary technologies involved when accessing a FileMaker Pro database from a
web browser, you must assess the activities on the web server before closing a file. Some scripts open
additional “windows” in the virtual FileMaker environment on the web server, and they must be closed
before the session can be terminated. Any open windows will be closed automatically if web users click
the Log Out button or when the session times out. For more information, see
“Creating a script to log out
of a database and close the session” on page 37.
1 After converting your files, you should open each script that web users might run and select Web
Publishing from the Show Compatibility list in the Edit Script window to verify that the script will execute
properly with Instant Web Publishing.
1 In Instant Web Publishing, the GetLayoutObjectAttribute function works as in FileMaker Pro, except for
the following differences:
1 The hasFocus, containsFocus, source and content attributes return values that were current
when the web browser most recently loaded the page. That is, these attributes aren’t updated after the
user clicks or tabs into an object, edits data without submitting it, navigates to other web pages within
a web viewer, and so on.
1 When this function acts on a web viewer, the content and source attributes return the same value,
a URL.
For more information on the GetLayoutObjectAttribute function, see FileMaker Pro Help.