[sclug] XHTML Question
Matthew Browning
mb at matthewb.org
Sat Oct 25 09:05:44 UTC 2003
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Friday 20 June 2003 01:01, Tim Sutton wrote:
> Hi All
>
> I am trying to make an xhtml compliant page so that I can put the
> nice little w3c xhtml 'tick' logo at the bottom. Everything in the
> page is compliant, except in som cases I create an empty select box
> that get populated by javascript after the page has been loaded
> through user interaction. So according to the w3c validator both:
>
> <select>
> </select>
>
> and
>
> <select/>
>
> Are not valid. Does anyone have a clever way of including an empty
> select box and still maintaining a valid xhtml page?
The obvious fix would be to put an <option> in there when the page
loads with something like `-- SELECT --' in there and a value of
nothing. Modify the JavaScript to replace this whenever it populates
the box.
Its an interesting question since the page `becomes' valid when it is
actually used so is clearly in the spirit of XHTML; in this sense, is
it that different to a document containing PHP scripting - you can't
validate it as is but the final output is (might be) compliant?
Matthew Browning.
- --
http://matthewb.org/public_key.txt
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQE+8rt1y5o0lRFL2ooRAiNVAJwNKMxcwMKTGFGVRAvOpryAYej+ZwCguE5K
djO0df6SHuo1vqrZEP9/vWg=
=TXM0
-----END PGP SIGNATURE-----
More information about the Sclug
mailing list