<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Safari-Bug or Not? DOM Exception 7</title>
	<atom:link href="http://www.g-roc.com/27_safari-bug-or-not-dom-exception-7.html/feed" rel="self" type="application/rss+xml" />
	<link>http://www.g-roc.com/27_safari-bug-or-not-dom-exception-7.html</link>
	<description>PHP freelancer, web developer, mobile web enthusiast</description>
	<lastBuildDate>Fri, 06 Aug 2010 20:02:29 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Dwight Vietzke</title>
		<link>http://www.g-roc.com/27_safari-bug-or-not-dom-exception-7.html/comment-page-1#comment-94</link>
		<dc:creator>Dwight Vietzke</dc:creator>
		<pubDate>Fri, 23 Jul 2010 02:03:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.g-roc.com/27_safari-bug-or-not-dom-exception-7.html#comment-94</guid>
		<description>Hi all,

The problem sometimes, as eluded to above, is that you can&#039;t modify elements with .innerHTML or use other element modification methods (document.write() I think) when the page is served as XML. That is content-type &#039;application/xhtml+xml&#039;. This is true for many browsers (all?), including Chrome that can read true XML pages. So pages served as XML will error on .innerHTML, unless you create the element in javascript, append it the the document and then use .innerHTML. Why it works for added elements and not existing ones is beyond me, but oh well.

Otherwise the problem might just be as stated, that you are trying to modify something that doesn&#039;t (clearly) exist yet, is considered &#039;read only&#039; or something.

So what to do it the first case of an XML page?

I found this on the web:

BetterInnerHTML v1.2, (C) OptimalWorks.net

Just google the above for the latest version of their .innerHTML replacement code. Works great for me, although I did modify it for may own purposes (made a Dojo style module of it). It uses simple DOM munipulation to accomplish the same thing as .innerHTML.

Hope that helps others who follow this error.</description>
		<content:encoded><![CDATA[<p>Hi all,</p>
<p>The problem sometimes, as eluded to above, is that you can&#8217;t modify elements with .innerHTML or use other element modification methods (document.write() I think) when the page is served as XML. That is content-type &#8216;application/xhtml+xml&#8217;. This is true for many browsers (all?), including Chrome that can read true XML pages. So pages served as XML will error on .innerHTML, unless you create the element in javascript, append it the the document and then use .innerHTML. Why it works for added elements and not existing ones is beyond me, but oh well.</p>
<p>Otherwise the problem might just be as stated, that you are trying to modify something that doesn&#8217;t (clearly) exist yet, is considered &#8216;read only&#8217; or something.</p>
<p>So what to do it the first case of an XML page?</p>
<p>I found this on the web:</p>
<p>BetterInnerHTML v1.2, (C) OptimalWorks.net</p>
<p>Just google the above for the latest version of their .innerHTML replacement code. Works great for me, although I did modify it for may own purposes (made a Dojo style module of it). It uses simple DOM munipulation to accomplish the same thing as .innerHTML.</p>
<p>Hope that helps others who follow this error.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: goran</title>
		<link>http://www.g-roc.com/27_safari-bug-or-not-dom-exception-7.html/comment-page-1#comment-86</link>
		<dc:creator>goran</dc:creator>
		<pubDate>Mon, 22 Mar 2010 18:36:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.g-roc.com/27_safari-bug-or-not-dom-exception-7.html#comment-86</guid>
		<description>Works for me too. Thanks a_[w]!</description>
		<content:encoded><![CDATA[<p>Works for me too. Thanks a_[w]!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: NB</title>
		<link>http://www.g-roc.com/27_safari-bug-or-not-dom-exception-7.html/comment-page-1#comment-70</link>
		<dc:creator>NB</dc:creator>
		<pubDate>Tue, 19 May 2009 23:59:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.g-roc.com/27_safari-bug-or-not-dom-exception-7.html#comment-70</guid>
		<description>Thanks a_[w], that did the trick for me!</description>
		<content:encoded><![CDATA[<p>Thanks a_[w], that did the trick for me!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: a_[w]</title>
		<link>http://www.g-roc.com/27_safari-bug-or-not-dom-exception-7.html/comment-page-1#comment-69</link>
		<dc:creator>a_[w]</dc:creator>
		<pubDate>Wed, 13 May 2009 17:32:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.g-roc.com/27_safari-bug-or-not-dom-exception-7.html#comment-69</guid>
		<description>For dynamic CSS you can use &quot;innerText&quot; property of STYLE tag object. It works without any errors.</description>
		<content:encoded><![CDATA[<p>For dynamic CSS you can use &#8220;innerText&#8221; property of STYLE tag object. It works without any errors.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rocco</title>
		<link>http://www.g-roc.com/27_safari-bug-or-not-dom-exception-7.html/comment-page-1#comment-60</link>
		<dc:creator>Rocco</dc:creator>
		<pubDate>Mon, 24 Nov 2008 20:30:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.g-roc.com/27_safari-bug-or-not-dom-exception-7.html#comment-60</guid>
		<description>thanks barney, seems like this problem never gets old ;) maybe you could provide a little code listing? i could add it to the original post.</description>
		<content:encoded><![CDATA[<p>thanks barney, seems like this problem never gets old ;) maybe you could provide a little code listing? i could add it to the original post.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Barney</title>
		<link>http://www.g-roc.com/27_safari-bug-or-not-dom-exception-7.html/comment-page-1#comment-59</link>
		<dc:creator>Barney</dc:creator>
		<pubDate>Sun, 23 Nov 2008 23:23:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.g-roc.com/27_safari-bug-or-not-dom-exception-7.html#comment-59</guid>
		<description>You were one of the top coherent hits for &#039;NO_MODIFICATION_ALLOWED_ERR: DOM Exception 7&#039;, which has been giving me bizzare trouble with Webkit when it comes to writing innerHTML for a STYLE tag (I&#039;m trying to build dynamically generated CSS stylesheets). As far as I can work out Webkit&#039;s DOM believes a lot of proper XML XHTML tags are read only. Not the most helpful comment to a year-old problem, I know :). I&#039;m getting arround it by defining another variable, copying the current innerHTML if needed, deleting the original element and then replacing it. Ugly but least roundabout way I can find of dealing with this seemingly unsolvable problem.</description>
		<content:encoded><![CDATA[<p>You were one of the top coherent hits for &#8216;NO_MODIFICATION_ALLOWED_ERR: DOM Exception 7&#8242;, which has been giving me bizzare trouble with Webkit when it comes to writing innerHTML for a STYLE tag (I&#8217;m trying to build dynamically generated CSS stylesheets). As far as I can work out Webkit&#8217;s DOM believes a lot of proper XML XHTML tags are read only. Not the most helpful comment to a year-old problem, I know :). I&#8217;m getting arround it by defining another variable, copying the current innerHTML if needed, deleting the original element and then replacing it. Ugly but least roundabout way I can find of dealing with this seemingly unsolvable problem.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
