summaryrefslogtreecommitdiff
path: root/htroot/Network.html
diff options
context:
space:
mode:
authororbiter <orbiter@6c8d7289-2bf4-0310-a012-ef5d649a1542>2010-06-23 10:29:04 +0000
committerorbiter <orbiter@6c8d7289-2bf4-0310-a012-ef5d649a1542>2010-06-23 10:29:04 +0000
commit8e3cbbb6a99a68d9afcce774616fdf5a32ee93bd (patch)
tree888269b57b44f5524eeb910793c495055091b293 /htroot/Network.html
parent2b4f8f6c06ce8d2945e1bfa354f670ffe6421501 (diff)
more animation: update of network image every 10 seconds
git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@6940 6c8d7289-2bf4-0310-a012-ef5d649a1542
Diffstat (limited to 'htroot/Network.html')
-rw-r--r--htroot/Network.html30
1 files changed, 20 insertions, 10 deletions
diff --git a/htroot/Network.html b/htroot/Network.html
index 7e9f23bc1..04bb1215e 100644
--- a/htroot/Network.html
+++ b/htroot/Network.html
@@ -10,19 +10,29 @@
</style>
<script type="text/javascript">
- imgname = "NetworkPicture.png?width=768&height=576&bgcolor=FFFFFF&coronaangle=";
- i = 0;
+ imagestub = "NetworkPicture.png?width=768&height=576&bgcolor=FFFFFF&coronaangle=";
+ imageindex = 0;
+ imagecycles = 0;
imagearray = new Array(4);
- for (j = 0; j < 4; j++) {
- imagearray[j] = new Image(768, 576);
- angle = j * 90;
- imagearray[j].src = imgname + angle;
- }
+ setTimeout("initanimation()", 100);
setTimeout("doanimation()", 1000);
+ function initanimation() {
+ for (j = 0; j < 4; j++) {
+ imagearray[j] = new Image(768, 576);
+ angle = j * 90;
+ time = new Date().getTime();
+ imagearray[j].src = imagestub + angle + "&time=" + time;
+ }
+ }
function doanimation() {
- document.getElementById("NetworkPicture").src = imagearray[i].src;
- i++;
- if (i == 4) { i = 0; }
+ document.getElementById("NetworkPicture").src = imagearray[imageindex].src;
+ imageindex++;
+ if (imageindex == 4) { imageindex = 0; }
+ imagecycles++;
+ if (imagecycles == 100) {
+ initanimation();
+ imagecycles = 0;
+ }
setTimeout("doanimation()", 100);
}
</script>