-1

My goal is to include HTML buttons in the Index page in order to classify my MRTG page in different subcategories. Right now what I have done is to make 6 empty graphs with a .png created by myself and it works fine. The only problem is that now I want to add more pages and I would want to have smaller buttons because I use 3 columns and they have the same size as a graph.

I have also tried by modifying the index.html file but everytime I want to add a graph I have to run the indexmaker so I run:

/usr/bin/indexmaker --output=/var/www/mrtg/index.html --title='MRTG Test'
--columns=3 /etc/mrtg/cfg/mrtg.cfg

Does anyone know how to do this please?

Thank you very much.

alexus
  • 12,342
  • 27
  • 115
  • 173
Javier Suárez
  • 139
  • 1
  • 9

1 Answers1

0

I finally found how to do it. I just have to create a HTML page and at the top I place an hoverable dropdown menu (dropdown menu that appears when the user moves the mouse over an element) and then with iframe I include the index.html MRTG page.

Here is how to create the hoverable dropdown menu:

http://www.w3schools.com/howto/howto_css_dropdown.asp

In order to include with iframe the index.html page:

 <div>
            <iframe id="form-iframe" src="index.html" style="margin:0; width:100%; height:150px; border:none; overflow:hidden;" scrolling="no" frameborder="0" onload="AdjustIframeHeightOnLoad()">
            </iframe>
            <script type="text/javascript">
                    function AdjustIframeHeightOnLoad() { document.getElementById("form-iframe").style.height = document.getElementById("form-iframe").contentWindow.document.body.scrollHeight + "px"; }
                    function AdjustIframeHeight(i) { document.getElementById("form-iframe").style.height = parseInt(i) + "px"; }
            </script>
    </div>

The javascript part is for autoadjusting the content to the page size.

Javier Suárez
  • 139
  • 1
  • 9