DU wrote:
Bryan wrote: Hey if I have a script id
script elements do not take id attribute
http://www.w3.org/TR/html401/interac...ml#edef-SCRIPT
They do in Valid XHTML 1.0
<http://www.w3.org/TR/xhtml1/dtds.html#dtdentry_xhtml1-strict.dtd_script>
<http://www.w3.org/TR/xhtml1/dtds.html#dtdentry_xhtml1-transitional.dtd_script>
so you can use (mostly) standards compliant
var s = document.getElementById("script_id");
if (s)
{
s.src = "...";
}
there. Whether using XHTML on the Web these days is a wise decision is
another matter, though: <http://www.hut.fi/u/hsivonen/xhtml-the-point>
PointedEars