title: Simple jquery ajax php request
body: <p>I am doing a basic jquery ajax call on a php file and can't seemsto figure out why it isn't working. Any help is appreciated. Fiebug does not seem to show any ajax or XHR action going on. I want to not to refresh the page and just execute the ajax call. Thanks.</p>
  
  <p>JS</p>
  
  <pre><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"&lt;/script&gt;
  &lt;script&gt;
  function getData(url_param){
      $.ajax({
          type: 'get',
          url: 'data.php',
          data: {url_param:url_param},      
          success: function(data) {
              $('#data').html(data);        
          }
      });
  };
  
  $('#clickMe').click(function(e){
      e.preventDefault();
      getData(2);
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>HTML:</p>
  
  <pre><code>&lt;div&gt;&lt;a id='clickMe' href='data.php?url_param=url_param'&gt;CLICK ME TO RUN PHP&lt;/a&gt;&lt;/div&gt;
  &lt;div id="data"&gt;&lt;/div&gt;  &lt;!-- divto show result --&gt;
  </code></pre>
  
  <p>PHP:</p>
  
  <pre><code>&lt;?php
  
  if($_GET['url_param']){
      echo "simple ajax call";
  } 
  
  ?&gt;
  </code></pre>