Hi i have this code in my php file and it does work greatly on Firefox and not in IE, IE doesn't reload div with this javascript <?php print <<<HERE <script type="text/javascript"> $(document).ready(function() { $("#loader").load("content.php?uname=$uname"); var refreshId = setInterval(function() { $("#loader").load("content.php?uname=$uname"); }, 5000); }); </script> HERE; ?> <div id="loader"></div> how can i make this work on IE? Thanks.
Use a string expression for setInterval. May move $("#loader").load("content.php?uname=$uname"); to a function. Would even look nicer.
i tried like this <?php print <<<HERE <script type="text/javascript"> setInterval("calldiv()", 5000); function calldiv(){ $("#loader").load("content.php?uname=$uname"); } </script> HERE; ?> <div id="loader"></div> this didnt work too
weird thing is if i open new tab on IE8 it works, seems like IE8 freeze codes after first execution and then it works if i do some activity with browser but in firefox code works perfectly without any problem.
found problem and it was due to IE cache content.php and it doesnt load on intervals any idea to prevent those php files from cache by IE ?
I had this problem too, the fix was changing something in css file. I forgot what lol already a while ago.
yeah but looking for a way to do that with page since i can not tell users to stop browser cache to view my page.
Not sure if it works on all browser, but you can tell browsers not to cache through meta tags. Have a look here http://www.i18nguy.com/markup/metatags.html
after spending whole night looking for a solution, i found a fix by sending POST variable with load () Thanks for all who support