title: Javascript value comparison is illogical
body: <p>First the code:</p>
  
  <pre><code>function focusAction(thefield, autofill) {
  
  if (thefield.value == thefield.defaultValue &amp;&amp; (thefield.style.color == 'rgb(153, 153, 153)' || thefield.style.color == '#999999')) {
      thefield.style.color = "#000000";
      if (autofill == "")
      thefield.value = '';
  }
  }
  
  function blurAction(thefield, autofill) {
      //var content = thefield.value;
  if (thefield.value == '' || thefield.value == null) {
      thefield.value = thefield.defaultValue;
      if (autofill == "")
          thefield.style.color = "#999999";
  } else {
      //thefield.style.color="green";
  }
  }
  </code></pre>
  
  <p>So here is the deal: If I put if (thefield.value == " " || thefield.value == null) it works but you must have a space. If the box is empty it does not work. This only affects textareas. It works fine with blank textboxes. </p>
  
  <p>I am really baffled by it, anyone have any idea on why a space works but an empty "" or '' or null doesn't?</p>