How To Create Like And Dislike
Posted 12 July 2013 - 01:13 AM
Simply create a ajax link and pass parameters in it according to your specification. then in controller action save the data.
Posted 12 July 2013 - 01:18 AM
And i hope you are clear with the logic behind like dislike.
So you just need to create one action in controller file and pass parameter in it eg.
and please change dislike link according the condition.
Then call this ajax link it will work.
Posted 12 July 2013 - 03:58 AM
YeAh this is what i am saying..refresh the div or something with ajax response after updating a result with new like or dislike..
from controller action return something like
or your can return json opbject like
$array = array('like_count'=>$likeCount,'dislike_count'=>$dislikeCount); return CJSON::encode($array);
Then update your div with the ajax response.