My problem is I got 2 link call the same function, but in first link I can see ajax request in firebug(run fine) but in second query, my ajax totally won't show in firebug(request won sent out) and alert me 0,error,undefined.
However I already try both of my link, its valid and can be surf.
HTML
<a onclick="friend_act(url3)">test</a>
<a onclick="friend_act(url4)">test2</a>
JS
function friend_act(url2){
$.ajax({
type: 'POST',
url:url2,
data: {ao:1,msg:1},
dataType: 'json',
beforeSend: ShowLoading,
success: function(resp){
$('#theLoading').dialog('close');
$('#loading').html('');
//add friend
},
error:function(xhr, ajaxOptions, thrownError){
alert(xhr.status);
alert(ajaxOptions);
alert(thrownError);
$('#theLoading').dialog('close');
$('#loading').html('');
}
});
}