title: Javascript - How to set checkbox checked based on a variable
body: <p>I've done my best to search all of the answers and can't find anything that answers this specifically. So, if you find something, please let me know and I'll remove this right away. </p>
  
  <p>I created a JSFiddle to show my problem (JS portion copied below for ease of reference): <a href="http://jsfiddle.net/hg67R/1/" rel="nofollow">http://jsfiddle.net/hg67R/1/</a></p>
  
  <p>When I am trying to set the value of a checkbox based on the value of a variable it will not seem to set correctly. The example I created should save the current state of each checkbox (which is does correctly). Then, no matter how you change those checkboxes, it should change them back when you click load. The storage variables are correct but it is not setting the checkboxes correctly. I'm certain it is something obvious but I sure can't see it. </p>
  
  <pre><code>function save() {
      localStorage.setItem("numbers", document.getElementById("Numbers").checked);
      localStorage.setItem("tips", document.getElementById("Tips").checked);
  }
  
  function load() {
      document.getElementById("Numbers").checked = localStorage.numbers;
      document.getElementById("Tips").checked = localStorage.tips;
  
      console.log("numbers storage: " + localStorage.numbers);
      console.log("numbers box: " + document.getElementById("Numbers").checked);
      console.log("tips storage: " + localStorage.tips);
      console.log("tips box: " + document.getElementById("Tips").checked);
  }
  </code></pre>
  
  <p>The console.logs just show me that the variables are storing and loading correctly.</p>
  
  <p>Thanks!</p>