title: how to unset session in javascript on slider change
body: <p>How can I unset a session using javscript. I know this can't be done in javascript alone but we have to call a php script. I want to unset the session on the change of my sldier value. i.e.</p>
  
  <pre><code> $('#slider1').bind('change', function (event) {
                          $('#slider1Values').html('Value: ' + event.args.value.toFixed(2));
                     //I want to unset the session here
                      });
  </code></pre>
  
  <p>I found some post where we can unset it in a button click by redirecting to another php page where I can call the php script to unset the session. I want something which unsets a session on the change of the slider without redirecting it into another page if possible. I saw it can be done using ajax but could not find an example. If any links or source please provide. Is this possible by doing?</p>
  
  <pre><code>var a=&lt;?php  unset($_SESSION['data']);?&gt;;
  </code></pre>