title: Ajax, Jquery in wordpress return nothing
body: <p>this is my code, it works without wordpress. but as put into wordpress, the ajax part always failed. 
  i include jquery and ajax in wordpress like this</p>
  
  <pre><code>function transtatus_metaboxes(){
      if (is_admin() &amp;&amp; !trans_parents_zero($GLOBALS["post_info"])){
          wp_deregister_script( 'jquery' );
          wp_register_script( 'jquery', 'http://code.jquery.com/jquery-latest.js');
          wp_enqueue_script( 'jquery' );
          add_meta_box('transtatus_show', 'Translations Status', 'transtatus_show', 'post', 'side', 'high');      
      }
  }
  
  function trans_action_ajax(){
  ?&gt;&lt;!-- jquery ajax function --&gt;
  &lt;script type="text/javascript"&gt;
  &lt;!--
  $(function() {
      $(".ovalbutton").click(function() {
          var val = $(this).attr('href').match(/p=([0-9]+)/)[1];
          var val_adi = $(this).attr('href').match(/id=([0-9]*)/)[1]; 
          var str_val = null;
          var fnl_val = null;
          var dataString = null;
  
          if(val == 1){
              str_val = "Require Translation"; 
          } else if(val == 2) {
              str_val = "On Progress";
          } else if(val == 3) {
              str_val = "Completed";
          } else {
              str_val = "Finialised";
          }
  
          fnl_val = str_val + "," + val_adi;
          dataString = 'trans_cont_value=' + fnl_val;         
          $.ajax({
              type: "POST",
              url:  "http://localhost/marcopolowordpress/wp-content/plugins/translation-status/update.php",
              data: dataString,
              cache: false,
              success: function(html){
                  $('#display').text(" status set to " + str_val);
              }  
          });
          alert(dataString);  
      });
  });
  //-&gt;
  &lt;/script&gt;
  </code></pre>
  
  <p>then this is the update.php</p>
  
  <pre><code>&lt;?php
  require_once(dirname(dirname(dirname(dirname(__FILE__))))."/wp-config.php");
  
  $q=$_POST["trans_cont_value"];
  
  $con = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD);
  if (!$con){
    die('Could not connect: ' . mysql_error());
  }
  mysql_query("set names ".DB_CHARSET); //solved the unwanted character
  mysql_select_db(DB_NAME, $con);
  
  if(isset($q)){
      $strarray = explode(',', $q);
      $value = $strarray[0];
      $id = $strarray[1];
  
      mysql_query("UPDATE MESSAGES SET msg = '$value'");
  }
  ?&gt;
  </code></pre>
  
  <p>I dont see any problem with those code, but it doesnt work in wordpress. any help?
  appreciate in advance</p>