ISO FileMaker Magazine: FileMaker Video Tutorials, Templates, Help & More

FileMaker Deals

Video Browser

Scriptology Video Browser

Tools & Resources

Generating A Hit

Posted by: Editor / Monday, May 25, 1998 – 11:00am

by Marie P. Folker, <editor@filemakermagazine.com>, http://www.isoproductions.com

Automatic Hitlist
Results Without Request
BONUS: PRODUCT.FP3 and HTML files
PLATFORM: Mac/Win

Actions need to be triggered by either clicking on a link or submit button. This makes it difficult to make your site entry page a found set. This means that you cannot simply give someone a simple static URL and have them see a dynamic found set of information from your database. The accompanying CDML solution demonstrates a method utilizing frames that will auto populate a format file in the frame set with the results of a search.

The Solution Model

The idea behind the CDML solution file is a storefront site that puts different products on sale. Simply by checking the "sale_item" check box in the database, the item will be included in the found set displayed on the web site.

Frame Source Tags

What makes this solution possible is the use of frames. A frame document defines a grid with a similar architecture to tables. The open frame source tags contain a URL pointing to an HTML document that will occupy that frame area. Here is the "default.htm" page from the bonus solution:

<HTML>
<HEAD>
<TITLE>Glass Products</TITLE>
</HEAD>

<FRAMESET BORDER="0" FRAMEBORDER="0" rows="80,*">
<NOFRAMES>
<BODY>

<P>This browsers does not support frames.</P>

</BODY>
</NOFRAMES>
<FRAME SCROLLING="no" SRC="top.htm">
<FRAMESET BORDER="0" FRAMEBORDER="0" FRAMESPACING="0" cols="250,*">
<FRAME SRC="FMPro?-DB=product.fp3&-layout=cgi&-Format=hitlist.htm&sale_item=yes&-Find" MARGINWIDTH=0 MARGINHEIGHT=0 BORDER="0" FRAMEBORDER=0>
<FRAME SRC="blank.htm" name="detail frame">
</FRAMESET>
</FRAMESET>
</HTML>

Once you get past the opening HTML tags found on all pages, we see the open frameset tag:

<FRAMESET BORDER="0" FRAMEBORDER="0" rows="80,*">

Like other tags, there are many attributes that can be specified for the tag. In this case, I'm suppressing the border with BORDER="0" as well as the frame border with FRAMEBORDER="0". Rows="80,*" states that the top portion will be 80 pixels high and the * expresses that the remaining space is as tall as the browser window.

For those browsers that don't support frames, we have the following code that will display a message to the visitor explaining that they need a browser that supports frames in order to view this site. This is an optional construct but definitely a good practice to follow. Notice that the frame document doesn't require a Body tag. That's because the frame page is simply a description of a grid in which different HTML documents will be loaded.

<NOFRAMES>
<BODY>

<P>This browser does not support frames.</P>

</BODY>
</NOFRAMES>

Now let's describe our first frame:

<FRAME SCROLLING="no" SRC="top.htm">
<FRAMESET BORDER="0" FRAMEBORDER="0" FRAMESPACING="0" cols="250,*">

Very simply, we're specifying the "top.htm" page to be loaded in a non-scrolling frame area. It is this URL link style path and page location that enables us to generate an instant hitlist. The "top.htm" page is a static page; it's the title portion of the FileMaker Magazine CDML Template. The next line of code divides the space up again--this time the right portion of the two panels is 250 pixels wide with the remaining to be determined by the window size of the browser.

The next page to load in the frameset will request the page with the help of the Web Companion. Here's what it looks like:

<FRAME SRC="FMPro?-DB=product.fp3&-layout=cgi&-Format=hitlist.htm&sale_item=yes&-Find" MARGINWIDTH=0 MARGINHEIGHT=0 BORDER="0" FRAMEBORDER=0>

Notice that we're not specifying a page to load in this space by its name alone. We're specifying a CGI call that includes the Web Companion. Let's dissect the string:

"FMPro?-DB=product.fp3&-layout=cgi&-Format=hitlist.htm&sale_item=yes&-Find"

FMPro? gets the Web Companion's attention

-DB=product.fp3 states which database will be referenced

-layout=cgi specifies which layout the referenced fields appear on

-Format=hitlist.htm is that page the data will be displayed in

sale_item=yes is our search criteria, sale_item is the field name and "yes" is the data we're looking for

-Find is what we want done with the data

The results are a dynamic hitlist without the user having to do anything or even be aware that a search has taken place in order to present the page before them.


## END ##

About author

Matt Petrowsky is the Senior Editor for ISO FileMaker Magazine. Matt has been involved with FileMaker Pro since the early '90s. Having authored many articles, a popular book, spoken at conferences and seminars, as well as provided private training, Matt is continuously updating his knowledge and skill about the powerful FileMaker platform. You can contact Matt by sending email to editor@filemakermagazine.com.

Filed under:
-