For more advance, web 2.0 techniques to be accomplished, pages need to have the DOCTYPE set to something such as

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

I looked on Google and it looks like DOCTYPE is read only. But I wanted to check with other people to see if there is a work around for this.

I want to write a JavaScript function to check the DOCTYPE systemId and if it was not set to http://www.w3.org/TR/html4/loose.dtd, it would then added it to the DOCTYPE.

Is this possible?

I noticed I can display the systemId like this.

var sysId = document.doctype.systemId;
alert( "systemId = " + sysId );

Any help with this is appreciated.

Thanks.