Ive been trying to get this for age
I am building a website which has an activity wall. I have the whole thing working except the like and unlike buttons. I have the
try this
<script type="text/javascript">
function process(LikeId) {
//your validation code
$.ajax( {
type: 'POST',
url: LikeUnlike.php, //file where like unlike status change in database
data:{like:LikeId},
success: function(data) {
//code you want to do after successfull process
}
} );
}
</script>
make changes in html
<a href='Javascript:void(0)' onclick='process(1)'>Like</a>
<a href='Javascript:void(0)' onclick='process(0)'>Unlike</a>