title: How to get slider range value and store it in a variable within JavaScript
body: <p>How can you get the range slider to store output as a variable (which will then be set as a a session)</p>
  
  <p>Thanks for the help</p>
  
  <p>*have removed &lt; and > so could display it with code</p>
  
  <p>Below is my code (which doesn't work)</p>
  
  <p>HTML Code:</p>
  
  <pre><code>    input type="range" min="1" max="100" value="50" class="slider" id="range"
      Value: span id="value" /span
      Value: span id="outputVar" /span
  </code></pre>
  
  <p>JavaScript Code:</p>
  
  <pre><code>    var slider = document.getElementById("range");
      var output = document.getElementById("value");
      var outputVarNo = document.getElementById("outputVar");
      output.innerHTML = slider.value;
  </code></pre>