title: Magento saving data in session but in Javascript
body: <p><strong>Magento Javascript Question</strong></p>
  
  <p>Does anyone know how I can call the session singleton in Javascript?
  I have a validation to a form like this which, everytime it validates the checkbox element, I want to to update a value in the session model. </p>
  
  <pre><code>Validation.add(
      'validate-tax', 'This is only applicable to certain states.', function(v) {
          var dropDown = document.getElementById("billing:region_id").querySelector('option:checked').text;
          if ((dropDown != 'New York' &amp;&amp; document.getElementById("billing:tax_exempt").checked == false) || (dropDown == 'New York')) {
              Mage::getSingleton('core/session')-&gt;setYourNameSession($session_value);
              return true;
          }
      }
  );
  </code></pre>
  
  <p>But I don't know if this is possible.</p>
  
  <p><strong>Additional Information</strong>
  I want to do a server-side validation on a checkbox. To do this my plan is to see if the value in the session is true or false. Alternatively, I was thinking to check the HTML elements directly from an observer, but I do not know how to do it.</p>