Hi everyone,
I have a main page:
--------------------------------------------------
<html><head><ti tle>Test</title>
</head><body>
<img id="img_a" name="img_a" src="image_1.pn g" alt=""><br>
<object width="0" height="0" type="text/html"
data="/cgi-bin/next_img?img_a" >
refresh image
</object>
</body></html>
--------------------------------------------------
and a script next_img generating this code:
--------------------------------------------------
<html><head>
<script language="javas cript1.2" type="text/javascript">
<!--
function doLoad() {
setTimeout( "refresh()" , 15 * 1000 );
}
function refresh() {
window.parent.d ocument.images["img_a"].src = "image_2.pn g";
window.location .reload( false );
}
//-->
</script>
</head><body onLoad="doLoad( )">
</body></html>
--------------------------------------------------
The Script specifies a new image (image_2.png) and the duration (15 sec)
to show the new image. On timeout the script is called again. The main
page may hold more than one image and object.
The Script looks nice on Mozilla Firebird but can't find the images in IE 6.0.
I also tested some variants of refresh() like:
function refresh() {
var image = window.parent.d ocument.getElem entById("img_a" );
image.src = "image_2.pn g";
window.location .reload( false );
}
but no success. What's wrong? Any help you could provide would be
greatly appreciated.
Thanks in advance,
Winfried Koenig
I have a main page:
--------------------------------------------------
<html><head><ti tle>Test</title>
</head><body>
<img id="img_a" name="img_a" src="image_1.pn g" alt=""><br>
<object width="0" height="0" type="text/html"
data="/cgi-bin/next_img?img_a" >
refresh image
</object>
</body></html>
--------------------------------------------------
and a script next_img generating this code:
--------------------------------------------------
<html><head>
<script language="javas cript1.2" type="text/javascript">
<!--
function doLoad() {
setTimeout( "refresh()" , 15 * 1000 );
}
function refresh() {
window.parent.d ocument.images["img_a"].src = "image_2.pn g";
window.location .reload( false );
}
//-->
</script>
</head><body onLoad="doLoad( )">
</body></html>
--------------------------------------------------
The Script specifies a new image (image_2.png) and the duration (15 sec)
to show the new image. On timeout the script is called again. The main
page may hold more than one image and object.
The Script looks nice on Mozilla Firebird but can't find the images in IE 6.0.
I also tested some variants of refresh() like:
function refresh() {
var image = window.parent.d ocument.getElem entById("img_a" );
image.src = "image_2.pn g";
window.location .reload( false );
}
but no success. What's wrong? Any help you could provide would be
greatly appreciated.
Thanks in advance,
Winfried Koenig
Comment