jquery, how to get var from $.ajax POST?
<p>edit3: i am using this script inside a facebook app, and not sure how to do it</p>

<p>i am passing a var to a php file using a post:</p>

<pre><code>&lt;div id="talentnum" class="cont_talentnum"&gt;&lt;?php echo $number; ?&gt;&lt;/div&gt;
&lt;a class="mine_click" href="#"&gt;&lt;/a&gt;
</code></pre>

<p>js here</p>

<pre><code> var strtalentnum;
$('.mine_click').live('click', function() {
    strtalentnum = $(this).closest("li").find(".cont_talentnum").text();
    $('#mine').trigger('click');

});

$("#mine").click(function(){
 if(strtalentnum){
  $.ajax({  
  type: "POST",  
  url: "fb_test.php",  
  data: strtalentnum,  
  success: function() { 
    var talentnum = strtalentnum; //this is 6203222
  alert(strtalentnum);
  }  
  });  
 }
});
</code></pre>

<p>and the php file is :</p>

<pre><code>&lt;?php
function fb_test()
{ echo 'xxx';
echo $_GET['strtalentnum'];
}
?&gt;
</code></pre>

<p>then i call the function in the same html page:</p>

<pre><code>&lt;?php  function fb_test(); ?&gt;
</code></pre>

<p>If i run this i get only the <code>xxx</code>. I also get the success alert <code>in my case '6203222'</code> so i know that the <code>POST</code> is happening</p>

<p>if i look in Chrome Network Headers i can see that :</p>

<pre><code>Request Method:POST
Status Code:200 OK
Form Data
6203222:
</code></pre>

<p>Why i cant get it using <code>$_GET['strtalentnum'];</code> ?</p>

<p>any ideas?</p>

<p>thanks</p>

<p>edit: <code>$_POST['strtalentnum'];</code> wont do the job either</p>

<p>edit2 added html</p>
