Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
132 lines (109 sloc) 9.9 KB
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Comments for XHTML document.write</title>
</head>
<body>
<h1>Comments for <a href="https://github.com/westonruter/xhtml-document-write">XHTML document.write()</a></h1>
<p><em>This is just a raw copy of the comments left on my blog before I started redirecting to GitHub.</em></p>
<ol>
<li id="comment-16" class="pingback"><section><address><a href="http://blog.rebeccamurphey.com/2008/06/06/could-the-brilliant-people-at-google-please-just-solve-this-already/" rel="external nofollow" class="url">rdmey | Could the brilliant people at Google please just solve this already?</a> </address>
<footer>
<a href="#comment-16" rel="permalink" title="Permalink to this comment"><time datetime="2008-06-06T08:12:52+00:00">June 6th, 2008 at 8:12 am</time></a>
</footer>
<p>[...] document.write() (and a bit of a related issue when it comes to Google Analytics). They a link to yet another way to get around it by hijacking the browser’s document.write(), just as John Resig suggested to me the last time I [...]</p>
</section>
</li>
<li id="comment-1614" class=""><section><address><a href="http://regionaltraffic.co.uk/" rel="external nofollow" class="url" title="Visit commenter's website"><img alt="" src="http://1.gravatar.com/avatar/55ace7741a8ab47b24e57a284db28b12?s=80&amp;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D80&amp;r=G" class="avatar avatar-80 photo" height="80" width="80" />pinkduck</a> </address>
<footer>
<a href="#comment-1614" rel="permalink" title="Permalink to this comment"><time datetime="2008-10-10T01:41:39+00:00">October 10th, 2008 at 1:41 am</time></a>
</footer>
<p>I note that loading this page in Firefox 3.0.3 generates an “uncaught exception: Parse Error:” exception, though fortunately Google AdSense continues to work. Any chance you could identify the cause of this?</p>
</section>
</li>
<li id="comment-1617" class=""><section><address><a href="http://weston.ruter.net/" rel="external nofollow" class="url" title="Visit commenter's website"><img alt="" src="http://0.gravatar.com/avatar/22ed378fbf1d918ef43a45b2a1f34634?s=80&amp;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D80&amp;r=G" class="avatar avatar-80 photo" height="80" width="80" />Weston Ruter</a> </address>
<footer>
<a href="#comment-1617" rel="permalink" title="Permalink to this comment"><time datetime="2008-10-10T09:23:47+00:00">October 10th, 2008 at 9:23 am</time></a>
</footer>
<p>@pinkduck:<br />
I just implemented a minor fix for this “parse error” issue that arose in Firefox 3.0.3. Thanks for the heads up.</p>
</section>
</li>
<li id="comment-2244" class=""><section><address><a href="http://www.bensfriends.com/theideaman/" rel="external nofollow" class="url" title="Visit commenter's website"><img alt="" src="http://1.gravatar.com/avatar/df729a042ff59210b8ae1847d3cef626?s=80&amp;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D80&amp;r=G" class="avatar avatar-80 photo" height="80" width="80" />TheIdeaMan</a> </address>
<footer>
<a href="#comment-2244" rel="permalink" title="Permalink to this comment"><time datetime="2008-12-03T15:51:58+00:00">December 3rd, 2008 at 3:51 pm</time></a>
</footer>
<p>This is just what I need! However, I need it for a commercial site and the choice of the GPL is preventative. Would you be open to releasing it under a more open license such as the MIT, BSD, or even (if you want copylefting) the MPL or LGPL? I believe it would gain wider usage.</p>
<p>For now, I’ll use John Resig’s.</p>
<p>Thanks for creating this in any case.</p>
</section>
</li>
<li id="comment-3234" class=""><section><address><a href="http://www.at9t.com" rel="external nofollow" class="url" title="Visit commenter's website"><img alt="" src="http://1.gravatar.com/avatar/91722372f6127e146a24c81e33aba509?s=80&amp;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D80&amp;r=G" class="avatar avatar-80 photo" height="80" width="80" />at9t</a> </address>
<footer>
<a href="#comment-3234" rel="permalink" title="Permalink to this comment"><time datetime="2009-03-05T21:27:42+00:00">March 5th, 2009 at 9:27 pm</time></a>
</footer>
<p>This one is so useful!</p>
</section>
</li>
<li id="comment-3806" class=""><section><address><a href="http://hugoduncan.org/" rel="external nofollow" class="url" title="Visit commenter's website"><img alt="" src="http://0.gravatar.com/avatar/80fa2a15219b987664e4d6f5c78b4c27?s=80&amp;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D80&amp;r=G" class="avatar avatar-80 photo" height="80" width="80" />Hugo Duncan</a> </address>
<footer>
<a href="#comment-3806" rel="permalink" title="Permalink to this comment"><time datetime="2009-04-04T20:04:04+00:00">April 4th, 2009 at 8:04 pm</time></a>
</footer>
<p>In Firefox 3.0.8 on Mac OS X, I find that the Adsense code gets inserted as a child of the body tag, even though the script tags are several divs deeper. Works fine in Opera and Safari, though.</p>
<p>For example, the Ads on this page appear just below the navigation bar at the top of the page.</p>
</section>
</li>
<li id="comment-8152" class=""><section><address><img alt="" src="http://1.gravatar.com/avatar/976c9f45b32aec5bbfed7eec841f9578?s=80&amp;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D80&amp;r=G" class="avatar avatar-80 photo" height="80" width="80" />Michiel V </address>
<footer>
<a href="#comment-8152" rel="permalink" title="Permalink to this comment"><time datetime="2009-08-18T22:49:48+00:00">August 18th, 2009 at 10:49 pm</time></a>
</footer>
<p>@Hugo Duncan<br />
I have that problem too, the adsense banner is now in the top-left corner of the srceen.<br />
Browser: FF 3.5.2</p>
</section>
</li>
<li id="comment-8167" class=""><section><address><a href="http://weston.ruter.net/" rel="external nofollow" class="url" title="Visit commenter's website"><img alt="" src="http://0.gravatar.com/avatar/22ed378fbf1d918ef43a45b2a1f34634?s=80&amp;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D80&amp;r=G" class="avatar avatar-80 photo" height="80" width="80" />Weston Ruter</a> </address>
<footer>
<a href="#comment-8167" rel="permalink" title="Permalink to this comment"><time datetime="2009-08-19T09:24:13+00:00">August 19th, 2009 at 9:24 am</time></a>
</footer>
<p>@Hugo and @Michiel:<br />
The same thing is happening on my machine; once I get time, I’ll try to figure out what’s going on.</p>
</section>
</li>
<li id="comment-8308" class=""><section><address><img alt="" src="http://0.gravatar.com/avatar/6c7dbc54521300f2511c17f5e692c765?s=80&amp;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D80&amp;r=G" class="avatar avatar-80 photo" height="80" width="80" />Peter H </address>
<footer>
<a href="#comment-8308" rel="permalink" title="Permalink to this comment"><time datetime="2009-08-25T00:20:45+00:00">August 25th, 2009 at 12:20 am</time></a>
</footer>
<p>@Weston</p>
<p>I am currently working on a web design which needs document.write to run under xhtml. </p>
<p>Within html my script works fine in both (FF*IE) and validates in W3C. It scrolls images horizontally inside a centralised DIV. In FF all my images sit to the left side of my DIV one on top of the other.</p>
<p>Yesterday I found this script, linked to it, but instead of my images scrolling horizontally within a div, they are all shown in a vertical list starting at the top left corner.</p>
<p>The relevant part is:-</p>
<p>for (ii=0;ii &lt; kk;ii++){</p>
<p> document.write(‘&lt;a href=’ + axData[ii].plink + ii + ‘ rel=”nofollow”&gt;’);</p>
<p> } // eof for()</p>
<p>My question is, is this problem the same as noted above, or is there an issue with my script? (I am using Firefox-3.5.2).</p>
</section>
</li>
<li id="comment-16239" class=""><section><address><a href="http://www.malform.no" rel="external nofollow" class="url" title="Visit commenter's website"><img alt="" src="http://0.gravatar.com/avatar/255efbcc8b8548238b757e97be96b27f?s=80&amp;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D80&amp;r=G" class="avatar avatar-80 photo" height="80" width="80" />Leif Halvard Silli</a> </address>
<footer>
<a href="#comment-16239" rel="permalink" title="Permalink to this comment"><time datetime="2010-04-18T12:16:08+00:00">April 18th, 2010 at 12:16 pm</time></a>
</footer>
<p>If the element one tries to insert contains an attribute with a hyphen, then the element is not inserted at all. </p>
<p>Usecases: HTML5: <code>data-myname="*"</code>, ARIA: <code>aria-describedby="*"</code>, HTTP: <code>&lt;meta http-equiv="*" content="*"&gt;</code>.</p>
<p>Example of non-working code:</p>
<p><code>&lt;script type="text/javascript"&gt;//&lt;![CDATA[<br />
document.write('&lt;div data-abc=abc &gt;Hello &lt;i&gt;World&lt;/i&gt;!&lt;/div&gt;');<br />
//]]&gt;&lt;/script&gt;</code></p>
</section>
</li>
<li id="comment-16242" class=""><section><address><a href="http://www.malform.no" rel="external nofollow" class="url" title="Visit commenter's website"><img alt="" src="http://0.gravatar.com/avatar/255efbcc8b8548238b757e97be96b27f?s=80&amp;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D80&amp;r=G" class="avatar avatar-80 photo" height="80" width="80" />Leif Halvard Silli</a> </address>
<footer>
<a href="#comment-16242" rel="permalink" title="Permalink to this comment"><time datetime="2010-04-18T14:42:59+00:00">April 18th, 2010 at 2:42 pm</time></a>
</footer>
<p>It is a bug in Resig’s HTMLparser – it doesn’t handle attributes with a hyphen in the name.</p>
</li>
</ol>
</body>
</html>
Jump to Line
Something went wrong with that request. Please try again.