« Pixer, AJAX Online Photo Editor | Main | Google To Hire iRows Founders and "Shutdown" the Service ? »

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.

Bookmark this article at these sites
Comments
1

Hello:

I am really in a bind. I need to AJAXify a web page that contains a charting component (ILOG). Unfortunately, charting component uses document.write() to write some divs and tags so I am having problems loading the charting component (mainly javascript) via AJAX.

Any ideas, please!!!!

PS: Site is an internal one in a company where 99% of users have IE

2

This is a little late to the game but maybe this will help somebody else out there. This worked great for an xml/xslt site in doing google adsense...

http://www.stevetucker.co.uk/page-innerxhtml.php

in combination with...

document.write=function(e){innerXHTML(IDorElement,e,true);};

hope this helps

Post a comment





(Email will remain hidden)





Please enter the security code you see here




Related entries
Email to a friend
Email this article to:


Your email address:


Message (optional):