title: how to load another page when clicking a button in another page and pass values to the loaded page in jquery?
body: <p>I have a button in a page. On clicking the button it should go to another page and that page should be viewed. Also I want to pass some values to the second page when the button is clicked and display the passed values in the second page.</p>
  
  <p>I have written a code in ajax but it is not working.</p>
  
  <pre><code>&lt;script&gt;
  $(document).ready(function(){
  
  $(".chk").click(function(){
  
  if($('input.checkin:checked').val()){
  
  
  
           var apikey = '60CF3C2oh7D+Q+aHDoHt88aEdfdflIjFZdlmsgApfpvg8GXu+W8qr7bKM33cM3';
           var password = 'fHdfvxk';
           var endpoint = 1;
           var method = 'ProcessPayment';
  
           var dataString = 'APIKey='+apikey+'&amp;APIPassword='+password+'&amp;ddlSandbox='+endpoint+'&amp;ddlMethod='+endpoint;
  
  
  
            $.ajax({
  
  
                  type: "POST",
                  url: "responsive.php",
                  data: dataString,
                  cache: false,
                  success: function(result){
  
  
  
  
                  }
          });
  
  
      //window.location.href= 'http://localhost/m/responsive.php';
  
      }
      else{
  
          alert("Please Accept the terms and conditions and continue further!!!!");
  
      }
  
  
  
  
  }); });
  
  &lt;/script&gt;
  </code></pre>
  
  <p>I have written a code in ajx when button click, but it will only pass the values to that page. But the page cannot be viewd. Can anyone suggest a solution for this ?</p>