Author Topic: Server Bandwith Graph not updating ?  (Read 1494 times)

0 Members and 1 Guest are viewing this topic.

warp

  • Guest
Server Bandwith Graph not updating ?
« on: December 17, 2008, 03:58:50 PM »
Hi,
i'am using HFS 2.3 beta Build #217.

It is not possible to update the server bandwith graph dynamicly.
I'm a little bit confused because a few day away it works.


This is my code (fragments):

<script language="JavaScript" type="text/javascript">
<!--
function updateGraph()
{Graph=new Image(); Graph.src="/~img_graph"+Math.floor(xMaxWindow/100*90)+"x40"; window.document.images[document.images.length-1].src=Graph.src;}
-->
</script>


<body style="background-color:#000000; height:100%;" oncontextmenu="return false;" onload="init(); setInterval('updateGraph()',3000);">
<img src="/~img_graph1x40" alt="Server Bandwidth">


Is this a well known problem ?


Thank you

warp


http:
//warp2001.dyndns.org:44792/

warp

  • Guest
Re: Server Bandwith Graph not updating ?
« Reply #1 on: December 17, 2008, 09:31:21 PM »
Hi,

sorry for the mess, the problem is solved.

Solved using this code (fragments):

<script language="JavaScript" type="text/javascript">
<!--
function updateGraph()
{Dummy=String(Math.random());Graph=new Image(); Graph.src="/~img_graph"+Math.floor(xMaxWindow/100*90)+"x40"; window.document.images[document.images.length-1].src=Graph.src+'?'+Dummy;}
-->
</script>


<body style="background-color:#000000; height:100%;" oncontextmenu="return false;" onload="init(); setInterval('updateGraph()',3000);">


So, it is a browser problem.
We must force update attaching ?0.123456789 to the image filename.
The random number is created by --> String(Math.random()).

Again, it is NOT a bug in HFS.
If you like to include a WebCam image to your homepage you also should attach that random number to the image file address.
If not no update occurs.

Thank you


warp


http:
//warp2001.dyndns.org:44792/