jquery reload php included page
hi there, i'm trying to write like/dislike script using php/mysql and i need jquery to refresh data without reloading whole page. i checked in manual, and found some tutorials, but i only figured out how to load php file in for eg. some hidden div, still trying to reload included file in one place. (sorry for my bad english).
id like it to look something like this:
some heading
like(link to like) / dislike(link to dislike)'
[$number_of_likes][$number_of_dislikes][%like/dislike]
and after click on like or dislike:
some heading
like(link to like) / dislike(link to dislike)
[$number_of_likes_updated][$number_of_dislikes_updated][%like/dislike_updated]
I've started with this code:
-
$(document).ready(function()
{
$(".like").click(function()
{
$.ajax
({
type: "POST",
url: "news_rating.php",
data: dataString,
cache: false,
success: function(html)
{
$("#content").html(html);
}
});
Also trying load function, but to be honest, i can't figure this out. Which function could help me?