V
vonmugel
I've written a script designed to automatically load a new URL every
15 seconds for use on a wall of monitors (keeping tabs on a large
network of sites that we administer). An upper frame contains much of
the javascript code, a central frame shows each site in succession,
the bottom frame cointains some system info.
Each monitor features a different combination of OS and browser - so
that we easily can see what our sites will look like to different
users. The script works fine on Windows, but fails to update the
location of the center frame on Linux (both in Konqueror and Mozilla).
This snippet is where it fails:
function skifteurl () {
top.midti.location.href = locations[teller][0];
var now = new Date ();
var timer = now.getHours() + locations[teller][2];
if (timer>23) { timer = timer - 24; }
if (timer<0) { timer = timer + 24; }
var minutter = now.getMinutes();
var lokaltiden = hvisNull(timer) + ':' + hvisNull
(minutter);
document.getElementById('siteadresse').innerHTML =
locations[teller][0];
document.getElementById('land').innerHTML =
locations[teller][1];
document.getElementById('lokaltid').innerHTML = 'Lokal tid:
' + lokaltiden;
document.getElementById('stats').innerHTML = '<a
href='+locations[teller][0]+'stats/ target=midti><img
src=knapper/stats.gif border=0></a>';
stoppklokkeID = window.setTimeout('nesteurl
()',ventetid*1000);
}
This function changes the location.href of the center frame of the
presentation while changing some info in the upper frame.
I get no error message and all updates to the upper frame work on
Linux. The only line that doesn't work on Linux is the one setting the
location.
I'm using Konqueror 3.2 on KDE and Mozilla 1.6 on Gnome 2.4. Both are
Mandrake 10.
Any suggestions?
(sorry about the Norwegian variable names)
--vonmugel
15 seconds for use on a wall of monitors (keeping tabs on a large
network of sites that we administer). An upper frame contains much of
the javascript code, a central frame shows each site in succession,
the bottom frame cointains some system info.
Each monitor features a different combination of OS and browser - so
that we easily can see what our sites will look like to different
users. The script works fine on Windows, but fails to update the
location of the center frame on Linux (both in Konqueror and Mozilla).
This snippet is where it fails:
function skifteurl () {
top.midti.location.href = locations[teller][0];
var now = new Date ();
var timer = now.getHours() + locations[teller][2];
if (timer>23) { timer = timer - 24; }
if (timer<0) { timer = timer + 24; }
var minutter = now.getMinutes();
var lokaltiden = hvisNull(timer) + ':' + hvisNull
(minutter);
document.getElementById('siteadresse').innerHTML =
locations[teller][0];
document.getElementById('land').innerHTML =
locations[teller][1];
document.getElementById('lokaltid').innerHTML = 'Lokal tid:
' + lokaltiden;
document.getElementById('stats').innerHTML = '<a
href='+locations[teller][0]+'stats/ target=midti><img
src=knapper/stats.gif border=0></a>';
stoppklokkeID = window.setTimeout('nesteurl
()',ventetid*1000);
}
This function changes the location.href of the center frame of the
presentation while changing some info in the upper frame.
I get no error message and all updates to the upper frame work on
Linux. The only line that doesn't work on Linux is the one setting the
location.
I'm using Konqueror 3.2 on KDE and Mozilla 1.6 on Gnome 2.4. Both are
Mandrake 10.
Any suggestions?
(sorry about the Norwegian variable names)
--vonmugel