I currently have a page that uses [login to view URL] on a timer to load an external php script into a div. That php script queries my mysql database for the last entry and then returns an iframe with an embedded google map. My problem is with the [login to view URL] it doesnt check to see if the data is different so my page still refreshes every 5 seconds. I would like to be able to call the external php script and return the data, then jquery can check to see if it matches the current content, if so, just ignore it. If it doesnt, then update the div which will cause the page to refresh to the new map location.
--------
<script src="[login to view URL]"></script>
<script>
$(document).ready(function() {
$("#timediv1").load('[login to view URL]');
var refreshId = setInterval(function() {
$("#timediv1").load('[login to view URL]');
}, 5000);
$.ajaxSetup({ cache: false });
});
</script>
--------
[login to view URL] returns echos an iframe tag with the embedded googlemap.
I can write the php to match whatever the jquery is looking for, i'm open to suggesions.