load("post.php") reloads the data twice
Hi i m using the insert code in post.php file and i m refreshing the div automatic using the below code:
<script>
$(document).ready(function() {
var b=$("#id1").val();
var d=$("#id2").val();
var refreshId = setInterval(function() {
if(d=="")
$("#demo").load("posts.php?id="+b);
else
$("#demo").load("friendspost.php?friendid="+d+"&id="+b);
}, 75000);
$.ajaxSetup({ cache: false });
</script>
I have a problem that when div refreshes, it again loads the previous action done
Mean When i post something it inserts the record from post.php file. after some time when div gets refreshed it again does the same thing. When i refresh the page manually it shows one time only
When I post something it shows like below
And when it gets refreshed by jquery then it shows as below and when i refresh it manually then it shows as above. I would be pleased if any one helps me out where i m going wrong