XHTML And document.write Replacement
John Resig posted document.write() replacement for XHTML compatibility working with Firefox 1.5+, Opera 9, and Safari 2+, a fix for document.write() usage with XHTML documents served with the doctype "application/xhtml+xml". John's solution still not the definitive solution for the problem since it fail for Safari 2 and sort-of Fail for Safari 3 and AdSense test. I don't think that hard-coding document.write in JavaScript will be a definitive solution anyway if browsers are not aware about W3C standard, without talking about IE which completely don't know how to render XHTML document correctly.


Subscribe to AJAX Magazine's feed