-
Html 4.01 Strict
What would be the proper syntax for this particular tag to validate as HTML 4.01/STRICT:
<form action="" name="webcam" >
The w3 validator barks over the last portion of the form code where it shows: 'name="webcam"' The name tag is essential for this particular javascript snippet:
document.form1.clock.value = x;
Any suggestions?
-
I believe you would need to use an "ID" ala CSS.
<style type="text/css">
<!--
#webcam { some properties; }
-->
</style>
<form id="webcam">
Then you can use the DOMs GetElementByID to change any attributes of the selected element.
-
*grumble*
No that wouldn't quite work. There are two instances where a name would be required for this particular Javascript.
[VBS]
<script type="text/Javascript">
<!--
var x = 30;
var y = 1;
var now;
function startClock() {
x = x-y;
document.form1.clock.value = x;
if (x <= 1) reload();
timerID = setTimeout("startClock()", 1000);
}
function reload() {
now = new Date();
var camImg = "wcam/home.jpg" + "?" + now.getTim();
document.campicture.src = camImg;
x = 30;
document.form1.clock.value = x;
}
// -->
</script>
[/VBS]
How would I rewrite that so that it wouldn't /need/ the name tag and reference instead the id tag? I am so /NOT/ a javascript person.
I'm close to ditching the entire Javascript portion and using a meta refresh. *sigh*