This is the tag I have been trying to auto-refresh //osCommerce tag FYI
<span id="cartInfo"></span>
with this script imbedded within the page that call the header file which ownes that tag
<script>
$(document).ready(function() {
setInterval(function(){
$("#cartInfo")
}, 3000);
$.ajaxSetup({ cache: false });
});
</script>
I dont need to populate the tag with outside pge data just need it to re-populate itself with information stored in the database.
<script type="text/javascript">
function cartRefresh(){
var t = document.getElementById('cartInfo');
var r = parseInt(t.innerHTML);
t.innerHTML = r;
}
x = setInterval(function (){ cartRefresh(); }, 3000);
</script>
Im getting closer!!! but now instead of a value '1 Items | $4.80" after 3 seconds the refresh is only returning the value '1'
Bookmarks