I’m having some trouble with some jQuery in IE. no errors showing up in console so it’s very difficult to debug.
I’ll give you the lowdown on how the script works
Index.php
< div id=’tableholder’ > [article.php gets loaded into this div by a PHP include() the first time around] < / div >
So within the article.php I have a button for refresh:
< img id=’fresh’ src=’whatever.jpg’ />
and I also have the following code at the top of article.php:
<script type='text/javascript'>
$(document).ready(function()
{
/*-------------------------------------------------------------------------------*/
// REFRESH BUTTON
$('#fresh').click(function() {
$('#loadergif').show(); //show loader gif until load complete
$("#tableholder").load('article.php?site=whatever','');
$('#loadergif').hide(); //hide loader gif when load is complete
});
/*-------------------------------------------------------------------------------*/
});
</script>
So when I click on the refresh button (image) it reloads the tableholder div -and this works fine on Google Chrome, Safari, Firefox – but on IE8 it only works once. after that it’s as if the jQuery within goes dormant. I’ve tried adding jQuery again within the article.php but that doesn’t seem to fix it either.
Any ideas ?
You can use
.post()instead of using.load(). As I have seen,.load()worked for me in Internet Explorer 8 though. Also you can check your jquery version once, if that is updated.Make sure
.click()is working properly. Can you tell the error thrown by the browser?