filsa.net: Frontier / Scripts / Pageheader Macros / Body Tag
This is part of Phil's Script Archive

UPDATED: Ready for Frontier 5!

Body Tag

Two fixes to make frame-users and Javascripters happy


This fat web page contains the bodyTag script object.

Use the 'Get Page Data' command from the Scripts menu to copy bodyTag into your object database.

Also available: info about fat pages and the Terms under which you can use this script.

This wrapper for the standard bodyTag macro (in html.data.standardmacros) adds two features for #pageheader users:

  • Supports the #includeBodyTag directive
  • Support for Javascript Event Handlers

Because it wraps around the standard macro, it will stay current if changes are made to the standard macro. Unless of course, Userland includes these changes in their next update--then this will be happily obsoleted. :-)

Supports the #includeBodyTag directive

People who use frames don't want the body tag in their pages. They can control this now by using this macro, which will preempt the standard macro. Then by setting #includeBodyTag to false, they can avoid the <body> tag.

Of course, this is in HTML3.2. HTML 4.0 has a new DTD for frames, which always keeps the <body; tag at the top level of the document. I hope to provide a system for working with this in the future--having all the pageheader scripts be sensitive to a #htmlVersion directive.

Do the onLoad and onUnload

Javascripters can use a new directive, after installing this script, to insert Javascript code into the body tag.

#bodyTagEvents "Your Javascript events handlers here"

Rather than having specific directives for onLoad and onUnload, I left it wide open, to accomodate future additions to Javascript, or anything else you might want to throw into the body tag.

Have fun!

Mon, Mar 16, 1998 at 8:46:25 PM by PS

View the Source: user.html.macros.bodyTag


© copyright 1997-98 by Philip Suh. Comments are appreciated.
This page last updated on 5/15/98; 9:18:41 AM.
<http://www.filsa.net/frontier/scripts/PageheaderMacros/bodyTag.html>
filsa.net: Frontier / Scripts / Pageheader Macros / Body Tag