ASForm returns error messages as HTML, and generates everything it needs to make an HTML4.0 compliant (Transitional, or "Loose") document. The default document comes with just a white background, no text highlighting to call attention to the more important lines of the message, and the message itself in a table (no borders) set to a width of 65%. The text color, link color, etc. is simply not defined so it's left to the user's browser to pick those colors.
To allow you to provide a more-or-less consistent look to all of your site, ASForm will let you dictate the background image and/or color, text color, link color, etc. that get installed in the <body> tag, but not the font face. (Sorry...) Those things are described in the configuration document. Here, we will concern ourselves with writing HTML for the headers and/or footers of the error messages.
By now you may have noticed that ASForm likes to know that it's really supposed to be sending files into the world, and looks for certain tags to indicate that it should. These HTML snippets are no different. Each of them must contain an HTML comment that starts with asformdoc and may then include whatever you want within it, e.g.
<!-- asformdoc additional comments if desired -->
And yes, that space between the opening dashes (or hyphens) and asformdoc must be there, and it must be a single-line comment. If there is an intervening newline (carriage return, whatever you call it) in the comment, ASForm will just refuse to use this file, and will tell you so if you run it in debug mode.
Unless the snippets you use are also used elsewhere, don't even think of trying to sneak SSI (Server Side Include) directives into your HTML snippets for ASForm. Not only would it not stand a chance of actually working, ASForm parses these files and will strip out the SSI directives just in case you've got a wierd server that looks for them in CGI output. (Is there such a critter??)
Here's the sequence of events as related to generating error messages:
If you want to see the tests happening, run ASForm in debug mode -- its output is generated as the tests are run. (Stripping SSI directives is not a part of the file testing, so it will not be indicated in the debug output.)
So, now that you know where in the document your HTML snippets will appear, you probably know what you can and can't do with them, and won't bother trying to put in your own <body> tags and such, right? Oh, yeah: If the error messages don't show up in some browsers, like Navigator, it's not ASForm doing it, it's your header/footer, and probably due to an attempt to incorrectly nest that table that the error message lives in. Trust me, I know these things.
|Writing Forms for
Use With ASForm
© 1999 - Art Sackett