title: JavaScript String Comparison in IE8
body: <p>I'm trying to compare two strings and for some reason, I'm getting "false" as the result.</p>
  
  <p>I've broken down the code to it's most simple function:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  function selectCat(cat) {
      var catName = cat.firstChild.nodeValue;
      alert(catName);
      if(catName.toString() == "Acronyms") {
          alert("True");
      } else {
          alert("False");
      }
  }
  &lt;/script&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
  &lt;ul&gt;
  &lt;li onclick="selectCat(this)"&gt;Acronyms&lt;/li&gt;
  &lt;/ul&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>This works just fine in Dreamweaver's Live View, as well as in IE8 (when I press F12 to preview). However, when I upload this page to my company's web content manager (IBM WebSphere Portal), it no longer works.</p>
  
  <p>I don't know what is different between the environments, but it's pretty frustrating. Anyone have any ideas why it might not be treating the category name as a String?</p>