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

Drew McClure AndrewM at BigDogs.com
Tue Apr 8 20:47:34 MEST 2003


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



More information about the mrtg mailing list