title: On button click - call Ajax function
body: <p>I stuck. I try to make Ajax call from button click. Function is loading and responding HTML data. HTML data in format like "&lt; div>...&lt; /div >". When I open "<a href="http://domain.com/load_info.php?id=1" rel="nofollow noreferrer">http://domain.com/load_info.php?id=1</a>" in browser, I get all HTML data. But when I try to load it by Ajax function, nothing is loading.</p>
  
  <p>buttons</p>
  
  <pre><code>   &lt;input type='button' onclick='getInfo(1);' value='Load Info' &gt;
  </code></pre>
  
  <p>Ajax Function</p>
  
  <pre><code>  function getInfo(id_number){
          alert('function started with id =' + in_number); // this alert works fine
          $.ajax({
              type:"GET",
              data: { 'id': id_number },
              url : "load_info.php",
              dataType: "text",
              success: function(response) {
                alert('success');                    // this alert is not working
                $("#info").prepend(response);
              }
          });
    };
  </code></pre>