title: access vbscript session variable using javascript
body: <p>in a bit of a pickle.</p>
  
  <p>The aim is to remember the date a user picked. Process being:</p>
  
  <p>They select date (e.g march 7th 2014) and click next (page 2).
  On the page 2 the date they select becomes a session variable</p>
  
  <pre><code>Dim bookStart
  bookStart = request.form("start")
  'manipulate bookstart for everything else
  session("selectedDate") = bookStart
  </code></pre>
  
  <p>The user then decides they want to go back a page (page 1) and select another date instead so they click back. My problem is the session variable i displayed on page 1 is nothing and I don't know why. Here is a snippet in my document.ready and a part of the form(for page 1):</p>
  
  <pre><code>if(!$('#selectedDate').val() == null || !$('#selectedDate').val() == ""){
      alert("there's something in here, lets display it: "+$('#selectedDate').val());
  }
  else if (dateCounter == null){
      var current = new Date();
      dateChange(current, "", 0);
      dateCounter = 0;
  }
  
  &lt;input type="hidden" id="selectedDate" value="&lt;%=session("selectedDate")%&gt;"&gt;
  </code></pre>
  
  <p>The if statement works that if the value is empty in the hidden input field, load the page with todays date!
  Please help!!</p>