title: Execute php file with javascript function
body: <p>I want to execute php file in javascript function. Code is as shown below:</p>
  
  <pre><code>&lt;a id="cancel" href="./?&amp;amp;_action=list" onclick="javascript:clearRecord();return rcm.command('list','',this,event)"&gt;Cancel&lt;/a&gt;
  
  
  &lt;script language="javascript" type="text/javascript"&gt;
  var u1='michael';
  function clearRecord() {
          $(function() {
              location.href = 'clear.php?h='+u1;
          });
      }
  &lt;/script&gt;
  </code></pre>
  
  <p>But when I click to cancel button, clear.php not executed. How I should come out from this?</p>