<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1044661" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1044661</link>
    <description></description>
    <language>en</language>
          <item>
    <title>Nothing much to do with</title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/validate-javascript#comment-1244226</link>
    <description> &lt;p&gt;Nothing much to do with JavaScript-- we&#039;re talking basic XHTML markup here.&lt;br /&gt;
Not that it matters much, since I suspect that every browser on earth treats your pages as HTML, not XHTML.&lt;/p&gt;
&lt;p&gt;Of course, if you did send your pages as XHTML, then HTML comments are a good way of hiding the script altogether...&lt;br /&gt;
&lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/smile.png&quot; title=&quot;Smiling&quot; alt=&quot;Smiling&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
 </description>
     <pubDate>Wed, 12 Aug 2009 23:14:20 +0000</pubDate>
 <dc:creator>webwiz</dc:creator>
 <guid isPermaLink="false">comment 1244226 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>Well, I&#039;m really not clued</title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/validate-javascript#comment-1244166</link>
    <description> &lt;p&gt;Well, I&#039;m really not clued up with JS, so I didn&#039;t know about that. Will look into that too, cheers.&lt;/p&gt;
&lt;p&gt;But as it happens, commenting out the JS allowed it to validate to XHTML Strict and still function correctly in 3 major browsers.&lt;/p&gt;
 </description>
     <pubDate>Tue, 11 Aug 2009 04:55:13 +0000</pubDate>
 <dc:creator>greg</dc:creator>
 <guid isPermaLink="false">comment 1244166 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>You&#039;d use a !CDATA section</title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/validate-javascript#comment-1244162</link>
    <description> &lt;p&gt;You&#039;d use a !CDATA section for XHTML though. (But you knew that...)&lt;br /&gt;
&lt;a href=&quot;http://www.w3schools.com/xmL/xml_cdata.asp&quot; title=&quot;http://www.w3schools.com/xmL/xml_cdata.asp&quot;&gt;http://www.w3schools.com/xmL/xml_cdata.asp&lt;/a&gt;&lt;/p&gt;
 </description>
     <pubDate>Tue, 11 Aug 2009 03:01:50 +0000</pubDate>
 <dc:creator>webwiz</dc:creator>
 <guid isPermaLink="false">comment 1244162 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>Ahh, cheers matt.
The</title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/validate-javascript#comment-1244161</link>
    <description> &lt;p&gt;Ahh, cheers matt.&lt;/p&gt;
&lt;p&gt;The commenting out worked.&lt;br /&gt;
I guess it should be done regardless of valid purposes if it prevents potential issues.&lt;/p&gt;
 </description>
     <pubDate>Tue, 11 Aug 2009 00:45:36 +0000</pubDate>
 <dc:creator>greg</dc:creator>
 <guid isPermaLink="false">comment 1244161 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>I always use
&lt;script</title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/validate-javascript#comment-1244160</link>
    <description> &lt;p&gt;I always use&lt;br /&gt;
&lt;code&gt;&amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;...&lt;/code&gt;&lt;br /&gt;
There&#039;s nothing wrong with that. &lt;/p&gt;
&lt;p&gt;The proper way of doing things is putting your JS in a file and including it in your document:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;/path/to/js.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Another thing I&#039;ve seen done is something like this&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;&amp;lt;!--&lt;br /&gt;document.write(&amp;quot;Something&amp;quot;);&lt;br /&gt;//--&amp;gt;&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;Comment out your JS with HTML comments (to get through the validator, and prevent non-JS users from experiencing weird stuff).&lt;/p&gt;
 </description>
     <pubDate>Tue, 11 Aug 2009 00:23:00 +0000</pubDate>
 <dc:creator>teammatt3</dc:creator>
 <guid isPermaLink="false">comment 1244160 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
