I want to do a MySQL,PHP,jQuery AJAX and JSON based friend request system like in Facebook. I have prepared the JSON results but I don't know how to do the jQuery part can anyone please help me here is the JSON results
this one when u have error
{ "status":"error", "message":"Invalid Attempt" }
if you are already friends
{
"status":"error",
"message":"Already Friends"
}
and for success
{
"status":"success",
"message":"Request sent"
}
after success message I want to hide the div HTML structure is
<div class="comment" id="uid-2">
<a class="avatar" href="http://mysitecom/u/remya">
<img src="http://mysitecom/uploads/avatars/remya_XysseWQ.jpg">
</a>
<div class="content">
<a class="author" href="http://mysitecom/u/remya">Remya Prakash</a>
<div class="text">
<a class="author" href="javascript:;" id="2">Send Request</a>
</div>
</div>
</div>