[thelist] CF: Tag to insert into body tag

jeff jeff at members.evolt.org
Mon Mar 19 02:13:01 CST 2001


: From: Frank
: Is anyone aware of a tag that will allow
: me to insert attributes into the <body>
: tag of a document in a similar way to
: <cfhtmlhead>? I use templates for my HTML,
: some documents use validation javascript
: other's not, and I prefer not to leave an
: OnLoad() in the body if it's not going to
: be used.

i would recommend that you call the event from a script block instead of
trying to add it as an attribute of the <body> tag.  there are a number of
ways to do this:

<script language="JavaScript" type="text/javascript">
  function onLoad()
    // do your onload stuff here

  window.onload = onLoad;
// -->

you would then, of course, put the above into a cfhtmlhead (if it matters
that it's in the <head> of the document), and be good to go.

good luck,


mailto:jeff at members.evolt.org

More information about the thelist mailing list