[mrtg] Re: Body tag editing for indexmaker works but how do I edi t body tags in the MRTG generated pages.

"Lotierzo, Leandro (Administración del Centro de Cómputos)" LLotierzo at lanacion.com.ar
Wed Apr 9 00:47:17 MEST 2003


Try something like this in your cfgs.

...
PageTop[ServerName_CPU1]: <form><input type="button" value="Back"
onclick="history.back()"></form><body bgcolor=#D6DFF7 text="#000000"
link="#6666CC" vlink="#999999" alink="#996699"><!--mstheme--><font
face="trebuchet ms, Arial, Helvetica"><H3>ServerName - Processor Load
Statistics for Processor 1</H3><BR> </H3> <TABLE>
	<TR><TD>System:</TD>     <TD>ServerName @ CC Bouchard - Rack
14</TD></TR>
	<TR><TD>Maintainer:</TD> <TD>DataCenterAdmin</TD></TR>
	<TR><TD>IpAddress:</TD>         <TD>10.10.10.10
(ServerName.DomainName.com)</TD></TR> </TABLE>
...

L

-----Original Message-----
From: Drew McClure [mailto:AndrewM at BigDogs.com] 
Sent: Tuesday, April 08, 2003 3:48 PM
To: 'mrtg at list.ee.ethz.ch'
Subject: [mrtg] Body tag editing for indexmaker works but how do I edit body
tags in the MRTG generated pages.

I posted to the group a question a few weeks ago regarding the --bodyopt tag
for indexmaker that allows you to insert additional lines into the body tag
when creating the index.html file.  
[Question]  Here's the problem. I want to insert onload="javascript:..."
>into the outputted index.html file. When I perl indexmaker the resulted
output removes the " and shows onload=javascript... It removes the quotes
I've specified in the --bodytag option when running indexmaker.  Here's my
code: PERL indexmaker --bodytag
onload="javascript:{if(parent.frames[0]&&parent.frames['MyFrameOne'].Go)pare
nt.frames['MyFrameOne'].Go()}" mrtg.cfg --output index.html 
[Response]  Escape the quotes by adding a backslash like so: indexmaker
--output index.html --bodyopt onload=\"javascript\" mrtg.cfg This gave the
following result: <BODY onload="javascript"> 
I received a quick response in regards to that and am thankful.  
Now, how can I get that tag into the resulting html files generated by MRTG?
It seems the output for the *.html files do not allow you to add a tag into
the body and I am fearful that I'll have to edit PERL code, which I am not
familiar with.
The reason I need this is because I have a dynamic menu in my top frame that
needs to be refreshed every time a new document is loaded into the bottom
frame.  I need the body tag to look like this for ALL documents that MRTG
produces so that it refreshes the menu:

<Body
onload="javascript:{if(parent.frames[0]&&parent.frames['myframeone'].Go)pare
nt.frames['myframeone'].Go()}">

Seems to me a quick edit of MRTG will allow me to place this line of code
where it needs to go so that all generated pages contain it.
If this tag is not present the menu fails to work.  Any ideas?  

Thanks in advance,

Drew

P.S. - I appreciate this group, too.  It has been a tremendous help for
troubleshooting MRTG.


--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://www.ee.ethz.ch/~slist/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi

--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://www.ee.ethz.ch/~slist/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the mrtg mailing list