<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1042455" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1042455</link>
    <description></description>
    <language>en</language>
          <item>
    <title>HolyWarlock</title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/javascript-help-0#comment-1236008</link>
    <description> &lt;p&gt;&lt;div class=&quot;quote-msg&quot;&gt;&lt;div class=&quot;quote-author&quot;&gt;&lt;em&gt;HolyWarlock&lt;/em&gt; wrote:&lt;/div&gt;className is SuperClass&lt;br /&gt;
bad method&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;While className and ClassName are used in some Super Class scripts (under the prototype library, for example)&lt;/p&gt;
&lt;p&gt;object.className is a valid &lt;a href=&quot;http://www.w3schools.com/htmldom/prop_classname.asp&quot;&gt;HTML DOM property&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;can you elaborate on your objection?&lt;/p&gt;
 </description>
     <pubDate>Fri, 12 Dec 2008 05:10:59 +0000</pubDate>
 <dc:creator>decibel.places</dc:creator>
 <guid isPermaLink="false">comment 1236008 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>className is SuperClass
bad</title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/javascript-help-0#comment-1235999</link>
    <description> &lt;p&gt;className is SuperClass&lt;br /&gt;
bad method&lt;/p&gt;
 </description>
     <pubDate>Fri, 12 Dec 2008 04:39:42 +0000</pubDate>
 <dc:creator>HolyWarlock</dc:creator>
 <guid isPermaLink="false">comment 1235999 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>getElementsByClassName works</title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/javascript-help-0#comment-1235881</link>
    <description> &lt;p&gt;getElementsByClassName works in Firefox, &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=getelementsbyclassname+ie&quot;&gt;not in IE&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;but this will work:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&amp;lt;html&amp;gt;&lt;br /&gt;&amp;lt;body&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;div class=&amp;quot;thediv&amp;quot;&amp;gt;&lt;br /&gt;This will get replaced.&lt;br /&gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;div class=&amp;quot;thediv&amp;quot;&amp;gt;&lt;br /&gt;This will get replaced.&lt;br /&gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;var divs = document.getElementsByTagName(&amp;#039;div&amp;#039;);&lt;br /&gt;for(i=0;i&amp;lt;divs.length;i++){&lt;br /&gt;if (divs[i].className == &amp;quot;thediv&amp;quot;) divs[i].innerHTML=&amp;#039;Hello i am here&amp;#039;;&lt;br /&gt;}&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;and with the onload statement:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&amp;lt;html&amp;gt;&lt;br /&gt;&amp;lt;head&amp;gt;&lt;br /&gt;&amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;function fillerup() {&lt;br /&gt;var divs = document.getElementsByTagName(&amp;#039;div&amp;#039;);&lt;br /&gt;for(i=0;i&amp;lt;divs.length;i++){&lt;br /&gt;if (divs[i].className == &amp;quot;thediv&amp;quot;) divs[i].innerHTML=&amp;#039;Hello i am here&amp;#039;;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;/head&amp;gt;&lt;br /&gt;&amp;lt;body&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;div class=&amp;quot;thediv&amp;quot;&amp;gt;&lt;br /&gt;This will get replaced.&lt;br /&gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;div class=&amp;quot;thediv&amp;quot;&amp;gt;&lt;br /&gt;This will get replaced.&lt;br /&gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;&amp;lt;!--&lt;br /&gt;onload=fillerup;&lt;br /&gt;//--&amp;gt;&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;I suppose this could become processor-intensive if there are a large number of divs that are not getting replaced - perhaps it would be worthwhile to examine some of the scripts in the &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=getelementsbyclassname+ie&quot;&gt;Google search&lt;/a&gt;&lt;/p&gt;
 </description>
     <pubDate>Mon, 08 Dec 2008 19:47:14 +0000</pubDate>
 <dc:creator>decibel.places</dc:creator>
 <guid isPermaLink="false">comment 1235881 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>This worked for</title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/javascript-help-0#comment-1235870</link>
    <description> &lt;p&gt;This worked for me:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&amp;lt;html&amp;gt;&lt;br /&gt;&amp;lt;body&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;div class=&amp;quot;thediv&amp;quot;&amp;gt;&lt;br /&gt;This will get replaced.&lt;br /&gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;div class=&amp;quot;thediv&amp;quot;&amp;gt;&lt;br /&gt;This will get replaced.&lt;br /&gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;var divs = document.getElementsByClassName(&amp;#039;thediv&amp;#039;);&lt;br /&gt;for(i=0;i&amp;lt;divs.length;i++){&lt;br /&gt;divs[i].innerHTML=&amp;#039;Hello i am here&amp;#039;;&lt;br /&gt;}&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;The JavaScript needs to be in the body and after the code you are looking to modify.&lt;/p&gt;
 </description>
     <pubDate>Mon, 08 Dec 2008 14:54:22 +0000</pubDate>
 <dc:creator>pr0gr4mm3r</dc:creator>
 <guid isPermaLink="false">comment 1235870 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>Hi Mate,
Yes i dont know</title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/javascript-help-0#comment-1235868</link>
    <description> &lt;p&gt;Hi Mate,&lt;/p&gt;
&lt;p&gt;Yes i dont know about the hyphen. But even without it just doesnt work??&lt;/p&gt;
 </description>
     <pubDate>Mon, 08 Dec 2008 14:33:51 +0000</pubDate>
 <dc:creator>benf</dc:creator>
 <guid isPermaLink="false">comment 1235868 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>I have found that the onload</title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/javascript-help-0#comment-1235861</link>
    <description> &lt;p&gt;I have found that the &lt;code&gt;onload&lt;/code&gt; statement requires a function name, with the function already declared elsewhere (note that the function parentheses are omitted too).&lt;/p&gt;
&lt;p&gt;example:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;function fillerup(){ &lt;br /&gt;var divs = document.getElementsByClassName(&amp;#039;thediv&amp;#039;);­&lt;br /&gt;for(i=0;i&amp;lt;divs.length;i++){ &lt;br /&gt;&amp;nbsp; divs[i].innerHTML=&amp;#039;Hello i am here&amp;#039;;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;window.onload = fillerup;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;you may need to declare divs as an array?&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;function fillerup(){ &lt;br /&gt;var divs = new Array();&lt;br /&gt;divs = document.getElementsByClassName(&amp;#039;thediv&amp;#039;);­&lt;br /&gt;for(i=0;i&amp;lt;divs.length;i++){ &lt;br /&gt;&amp;nbsp; divs[i].innerHTML=&amp;#039;Hello i am here&amp;#039;;&lt;br /&gt;}&lt;br /&gt;}&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;for some reason a hyphen is being added at the end of the line&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;var divs = document.getElementsByClassName(&#039;thediv&#039;);&lt;/p&gt;&lt;/blockquote&gt;
 </description>
     <pubDate>Mon, 08 Dec 2008 13:27:04 +0000</pubDate>
 <dc:creator>decibel.places</dc:creator>
 <guid isPermaLink="false">comment 1235861 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
