Get two images to reload on page????

S

Si Ballenger

I'm trying to get a webcam page going that uses a javascript
image refresh in a web page. In trying the below only one of the
images (image1.bat) refreshes. How do I seperate the two
javascript image refreshs so both image.bat and image1.bat keep
refreshing? I hope it is something simple if it can be done. I've
made a simple video switcher (
http://www.geocities.com/zoomkat/ppswitcher.htm ) that I want to
try with this setup. Thanks for any info!

====================================

<frame>
<script language="javascript">
var refreshrate=3; //SECONDS BETWEEN REFRESH
var image="http://zoomkat.d2g.com:88/cgi-bin/image.bat"; //IMAGE
NAME
var imgheight=240; //IMAGE HEIGHT
var imgwidth=320; //IMAGE WIDTH
function refresh(){
document.images["pic"].src=image+"?"+new Date();
setTimeout('refresh()', refreshrate*1000);}
document.write('<IMG SRC="'+image+'" ALT="No picture? Try hitting
your reload button. (F5)" NAME="pic" ID="pic"
WIDTH="'+imgwidth+'" HEIGHT="'+imgheight+'" BORDER="0"
STYLE="border: 1px solid Black;">');
if(document.images)window.onload=refresh;
</script>
</frame>


<frame>
<script language="javascript">
var refreshrate=3; //SECONDS BETWEEN REFRESH
var image="http://zoomkat.d2g.com:88/cgi-bin/image1.bat"; //IMAGE
NAME
var imgheight=240; //IMAGE HEIGHT
var imgwidth=320; //IMAGE WIDTH
function refresh(){
document.images["pic"].src=image+"?"+new Date();
setTimeout('refresh()', refreshrate*1000);}
document.write('<IMG SRC="'+image+'" ALT="No picture? Try hitting
your reload button. (F5)" NAME="pic" ID="pic"
WIDTH="'+imgwidth+'" HEIGHT="'+imgheight+'" BORDER="0"
STYLE="border: 1px solid Black;">');
if(document.images)window.onload=refresh;
</script>
</frame>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,434
Messages
2,571,691
Members
48,796
Latest member
Greg L.

Latest Threads

Top