Posted on: 8/20/2014 5:55:31 AM | Views : 442

HI,
I am trying to follow the URL: http://www.webdevbros.net/2006/12/14/keep-session-alive-with-javascript/
But, i am getting syntax errors in the line:
if (myImg) myImg.src = myImg.src.replace(/?.*$/, '?' + Math.random()); Is there anything to be changed?
I have used the full code like this:
function keepMeAlive(imgName) { myImg = document.getElementById(imgName); if (myImg) myImg.src = myImg.src.replace(/?.*$/, '?' + Math.random()); } window.setInterval("keepMeAlive('keepAliveIMG')", 100000); <div> <img id="keepAliveIMG" width="0" height="0" src="/Tets.jpg?" /> </div> How to fix this?
Thanks

Go to the complete details ...