title: Jquery and ajax on button click
body: <p>I have this submit button without a form..</p>
  
  <pre><code>&lt;input type='submit' id='conx' name='X' value='TEST x'&gt;
  </code></pre>
  
  <p>Now when the button is clicked i need to execute this code.</p>
  
  <pre><code>$con = fopen("/tmp/myFIFO", "w");
  fwrite($con, "XcOn");
  close($con);
  </code></pre>
  
  <p>How can i execute it in jquery and ajax?.</p>
  
  <pre><code>$("#conx").click(function(){
  
  //Execute this code
  //$con = fopen("/tmp/myFIFO", "w");
  //fwrite($con, "XcOn");
  //close($con);
  
  });
  </code></pre>
  
  <p>Thanks.</p>