Jquery Ajax refresh not working in IE.
Posted
by Probocop
on Stack Overflow
See other posts from Stack Overflow
or by Probocop
Published on 2010-04-28T09:51:25Z
Indexed on
2010/04/28
10:13 UTC
Read the original article
Hit count: 134
Hi, I have a <ul>
which refreshes every ten seconds to check if there have been any new tweets (its pulling from a twitter feed). This works fine in Firefox and Chrome etc, but it does not work in any version if Internet Explorer.
My code is as follows:
setInterval(function() {
$("#banter .scroll-pane").load(location.href+" #banter .scroll-pane>*","");
}, 10000);
My PHP function creating the list is as follows:
function showTweets($section, $limit, $class) {
$result = mysql_query("SELECT * FROM hash WHERE section = '".$section."' ORDER BY date DESC LIMIT ".$limit);
echo '<ul class="scroll-pane '.$class.'">';
while($row = mysql_fetch_array($result)) {
echo '<li>';
echo '<p>'.html_entity_decode($row['tweet']).'</p>';
echo '<a href="'.$row['user_url'].'">'.$row['user'].'</a>';
echo '</li>';
}
echo '</ul>';
}
Any idea what's going wrong? Thanks
© Stack Overflow or respective owner