[Javascript] 'name' property in forms not XHTML valid
Roger Roelofs
rer at datacompusa.com
Tue Jan 24 12:06:51 CST 2006
Jonathan,
On Jan 24, 2006, at 12:33 PM, Jonathan Gold wrote:
> function clearColors()
> {
> for (var i = 0; i < 3; i++)
> {
> document.formColors.elements[i].value="";
> }
> }
function clearColors() {
var theForm = document.getElementById("formColors");
if ( theForm ) {
for (var i = 0; i < theForm.elements.length; i++) {
theForm.elements[i].value = "";
}
}
}
By the way, ie/win doesn't know how to do xhtml strict, so I usually
suggest using html 4.01 strict instead.
Roger
--
Roger Roelofs web www.datacompusa.com
Datacomp Appraisal Services Email rer at datacompusa.com
3215 Eaglecrest Drive, NE
Grand Rapids, MI 49525-4593
More information about the Javascript
mailing list