R
Roel
Hello,
I have a simple script that will reload http://website/CAM1picture.jpg every
xx minutes. I'm trying to add a form <input type="submit" value="CAM1"
name="B1"><input type="submit" value="CAM2" name="B1"> So when I click on
CAM2 button it will reload http://website/CAM2picture.jpg and when I click
on CAM3 button it will reload http://website/CAM3picture.jpg and so on.
I appreciate if someone can show me how to do it. Here's a copy of the html
with the script.
==== Start HERE ===
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>ICUx10</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script type="text/javascript">
<!-- hide
var x = 10;
var y = 1;
var now;
function countdown() {
x = x-y;
document.form1.clock.value = x;
if (x <= 1) reload();
timerID = setTimeout("countdown()", 1000); }
function reload() {
now = new Date();
var camImg = "http://website/CAM1picture.jpg" + "?" + now.getTime();
document.ICUx10.src = camImg;
x = 10;
document.form1.clock.value = x; }
-->
</script>
</head>
<body onload="countdown()">
<p class="imgcen" align="center"><b><i><font face="Arial" color="#000080"
size="7">Sarceno's
Webcam</font></i></b>
<p class="imgcen" align="center">
<div align="center">
<center>
<table border="15" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" align="center"><img name="ICUx10"
src="http://website/CAM1picture.jpg" border=0 width=320 height=240></td>
</tr>
</table>
</center>
</div>
<p class="imgcen" align="center">
<form action="" name="form1" class="timer">
<p align="center"><font color="#ff0000">This screen will refresh
in</font> <input TYPE="text" NAME="clock" SIZE="2">
<font color="#ff0000">second</font><br>
</form><br>
<div align="center">
<center>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%">
<form method="POST">
<p><input type="submit" value="CAM1" name="B1"><input
type="submit" value="CAM2" name="B1"><input type="submit" value="CAM3"
name="B1"></p>
</form>
</td>
</tr>
</table>
</center>
</div>
</body>
</html>
==== END HERE ===
Thanks
I have a simple script that will reload http://website/CAM1picture.jpg every
xx minutes. I'm trying to add a form <input type="submit" value="CAM1"
name="B1"><input type="submit" value="CAM2" name="B1"> So when I click on
CAM2 button it will reload http://website/CAM2picture.jpg and when I click
on CAM3 button it will reload http://website/CAM3picture.jpg and so on.
I appreciate if someone can show me how to do it. Here's a copy of the html
with the script.
==== Start HERE ===
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>ICUx10</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script type="text/javascript">
<!-- hide
var x = 10;
var y = 1;
var now;
function countdown() {
x = x-y;
document.form1.clock.value = x;
if (x <= 1) reload();
timerID = setTimeout("countdown()", 1000); }
function reload() {
now = new Date();
var camImg = "http://website/CAM1picture.jpg" + "?" + now.getTime();
document.ICUx10.src = camImg;
x = 10;
document.form1.clock.value = x; }
-->
</script>
</head>
<body onload="countdown()">
<p class="imgcen" align="center"><b><i><font face="Arial" color="#000080"
size="7">Sarceno's
Webcam</font></i></b>
<p class="imgcen" align="center">
<div align="center">
<center>
<table border="15" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" align="center"><img name="ICUx10"
src="http://website/CAM1picture.jpg" border=0 width=320 height=240></td>
</tr>
</table>
</center>
</div>
<p class="imgcen" align="center">
<form action="" name="form1" class="timer">
<p align="center"><font color="#ff0000">This screen will refresh
in</font> <input TYPE="text" NAME="clock" SIZE="2">
<font color="#ff0000">second</font><br>
</form><br>
<div align="center">
<center>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%">
<form method="POST">
<p><input type="submit" value="CAM1" name="B1"><input
type="submit" value="CAM2" name="B1"><input type="submit" value="CAM3"
name="B1"></p>
</form>
</td>
</tr>
</table>
</center>
</div>
</body>
</html>
==== END HERE ===
Thanks