I have a site that has voting on the front page node, and I need to update a view on the same node after each vote. I'm currently using the following code in my page.tpl.php
<script type="text/javascript">
function fivestarResult(voteResult) {
$('div#fivestar-summary-'+voteResult.vote.id).html(voteResult.result.summary);
window.location = "http://www.mydomain.com/";
};
</script>
Is there a way to directly refresh the view instead of refreshing the whole page? I'm not very good in javascript so I'm a little lost.