Other Issues

By: James Reynolds - Revised: 2006-07-03 devin

Here is a mix of tips that I have learned through hard experience:

Don't mix CDML cookies with Javascript cookies. It gets messy.

I don't know why yet, but I get a "Socket not connected" error when my Javascript cookies are semi-large (I say semi because I am sure they are smaller than the browser set max.).

Don't use images that are within FileMaker Pro. Just save the images as normal files that can be served and then have fields that give the URL of the images. This way, the images can be easily edited with Photoshop or swapped with other images.

Like this:

<img src="[FMP-Field:PictureURL]" width="[FMP-Field:PictureWidth]" height="[FMP-Field:PictureHeight]">

So much cleaner...

Every search results page needs to have the -error variable tag set to load a page that has the code that looks for a no records error. For example, I use these three files:

error.html – HTML-File, 320 bytes
error_codes.txt – TXT-File, 4.5 KB
error_no_records.txt – TXT-File, 406 bytes

My error tag for all of my pages is "error.html".

When including external JavaScript files with [FMP-Include:filename] you must include a file with the <script> tag or else it wont work. Like this:

<HEAD>
...
<!-- there is no opening script tag because it is included in the following file -->
[FMP-Include:java_header.txt]
[FMP-Include:java_code.txt]
// End hiding script from older browsers -->
</SCRIPT>
</HEAD>

java_header.txt – TXT-File, 62 bytes

It is very hard to create page links for result pages with FileMaker Pro and the tags [FMP-CurrentFoundCount], [FMP-CurrentRecordNumber], and FMP-CurrentMax]. As a fix, I wrote this javascript: java_page_functions.txt. Include it in the header like this:

<HEAD>
...
<!-- there is no opening script tag because it is included in the following file -->
[FMP-Include:java_header.txt]
[FMP-Include:java_page_functions.txt]
// End hiding script from older browsers -->
</SCRIPT>
</HEAD>

java_page_functions.txt – TXT-File, 3.6 KB