[thelist] Tip: Converting to XHTML, javascript, name, id
.jeff
jeff at members.evolt.org
Mon Aug 26 05:01:01 CDT 2002
frank,
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> From: Frank
>
> If you are converting your site or apps over to strict
> XHTML 1.0, you'll find that using the "name" attribute
> will raise the validator's danders. You're doing simple
> error checking or roll-overs via Javascript. So now
> you've got to use ID instead of name. What do you do?
> What *do* you do?
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
it depends on the element. some elements are still allowed the use of the name attribute.
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> We change this:
>
> <input type="text"
> name="yourFieldName"
> value="Enter search keywords" />
> to:
>
> <input type="text"
> id="yourFieldName"
> value="Enter search keywords" />
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
and now your form will no longer post any data to the server -- not the desired intent, i'm sure. this is why i made the statement above. if the xhtml standard is so blind as to require us to *not* use the name attribute for form elements, then fuck the standard because there isn't a browser out there (that i'm aware of) that'll send data tied to fields based on id's.
.jeff
http://evolt.org/
jeff at members.evolt.org
http://members.evolt.org/jeff/
More information about the thelist
mailing list