title: How to pass a variable from current window to another window
body: <p>First Page </p>
  
  <pre><code>&lt;button onclick="refereceid_Transfer()"&gt;Try it&lt;/button&gt;
  
  &lt;script&gt;
  
  
  function refereceid_Transfer() {
  alert('test');
  var referenceid = "jggd154278";
  referenceid = btoa(referenceid);
  //sessionStorage.setItem("sent", referenceid); 
   window.open("second.jsp", "_blank", "toolbar=yes,scrollbars=yes,resizable=yes,top=500,left=500,width=400,height=400");
  }
  
  &lt;/script&gt;
  </code></pre>
  
  <p>Second Page </p>
  
  <pre><code>&lt;p id="s1"&gt;&lt;/p&gt;
  
  &lt;script&gt;
  $(document).ready(function(){
    // var a = sessionStorage.getItem("sent",id);
  alert(a);
  });  
  &lt;/script&gt;
  </code></pre>
  
  <p>I need to pass my reference id from one window to another window. I tried use session storage and local storage to pass variable and i have failed in both condition. is there new suggestion that i can pass my reference id to new window.</p>
  
  <p>Thanks </p>