NetTalk Central

Author Topic: Any way to add body tag info globally?  (Read 3597 times)

Mike Grigsby

  • Sr. Member
  • ****
  • Posts: 380
    • Yahoo Instant Messenger - onthedotsoftware
    • View Profile
    • MyHomeAssets! Software (among others)
Any way to add body tag info globally?
« on: May 02, 2008, 09:40:08 PM »
I'm thinking the answer is "no", but it might be a useful enhancement. Is there a way to add code to the body tag globally so I don't have to do it in every procedure?

What I want to do is add timeout code to my pages so a warning appears before the session timeout. For example;

<body onload="setTimeout('TimeoutWarning()', 900000)">

Maybe a procedure similar to PageFooterTag/PageHeaderTag that could define various parts of the page and cause them to inherit the code.
Mike Grigsby
Credify Systems
Central Oregon, USA

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Any way to add body tag info globally?
« Reply #1 on: May 02, 2008, 11:40:13 PM »
Hi Mike,

Actually there is a way to do what you want (specifically) but since that's the wrong thing to do in this case, I'm not gonna tell you  :). ( Well, ok, it involves overriding the _jsBodyOnLoad method in the web handler.)

However what you are doing is equivalent to putting the following inside the body somewhere;

<script>setTimeout('TimeoutWarning()', 900000);</script>

And since you want that on every page, then it seems to make sense to put it into the header, or footer procedure.

Cheers
Bruce