[thelist] xhtml 1.1 and javascript and w3 validation
Beau Hartshorne
beau at members.evolt.org
Sat Dec 14 12:29:26 CST 2002
Hi,
I'd like to write a page that validates to xhtml 1.1 transitional. On
the page, I have a simple form like this:
<form name="widgets">
<input type="text name="title" />
</form>
The xhtml validator chokes on the name="widgets" attribute. So, I tried
replacing it with this:
<form id="widgets">
<input type="text name="title" />
</form>
Which does validate, but which also breaks this JavaScript code (in
Mozilla and IE):
document.widgets.title.focus();
Can anyone tell me if there's another attribute that I could use that
JavaScript will know about (because JavaScript doesn't seem to be able
to find my id attribute).
TIA,
Beau
More information about the thelist
mailing list