[mrtg] Re: Re-writing html code

Drew McClure AndrewM at BigDogs.com
Thu Apr 17 20:25:42 MEST 2003


Check the documentation for MRTG.  It's in there.  If you're using
indexmaker to create the index page
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">

If you want each page to have the code use the cfgmaker's --bodyopt tag to
add this line to your each of your pages.  

I had a similar issue where I was using a dynamic menu and this worked fine.
Check earlier messages in this group for more info.

-----Original Message-----
From: Manny Ortega [mailto:aortega at univ-wea.com] 
Sent: Thursday, April 17, 2003 11:09 AM
To: 'mrtg at list.ee.ethz.ch'
Subject: [mrtg] Re-writing html code


I need to know if this can be done with the setup I have:
When MRTG creates a web page this is what appears in the html code:

</HEAD>
<BODY BGCOLOR="#ffffff">
<H1>Traffic Analysis for Public Network TARGET etc...</H1> <TABLE> <TR>

I need to change the body tag to include a special line for a java menu that
I'm trying to implement, I won't go into detail about the menu but I need
the following code inserted in the page: <body
onload="if(parent.frames[0]&&parent.frames['header'].Go)parent.frames['heade
r'].Go();"> 
Basically, I need that section to look like this:

</HEAD>
<BODY BGCOLOR="#ffffff"
onload="if(parent.frames[0]&&parent.frames['header'].Go)parent.frames['heade
r'].Go();">
<H1>Traffic Analysis for Public Network TARGET etc...</H1> <TABLE> <TR>

If the html code has that frame reference above in place, my menu works, I
have over 200 targets and I thought I could bite the bullet and paste the
code on every single page but the problem is that in 5 minutes the pages are
recreated and the body tag goes back to <BODY BGCOLOR="#ffffff"> and my menu
stops working.

I am running MRTG 2.9.18 on a W2K server, any reference to reading material
will be appreciated.

Thanks.

Alvaro (Manny) Ortega
Technical Support Analyst 
Universal Weather and Aviation, Inc. 
rm -rf /usr/bin/laden 

--
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