PDA

View Full Version : RSS displaybox: document.getElementById bug in IE8?



flapane
11-14-2010, 10:54 PM
1) Script Title:
RSS Displaybox

2) Script URL (on DD):
http://www.dynamicdrive.com/dynamicindex18/rssdisplaybox/index.htm

3) Describe problem:
Hi,
it seems that Internet explorer 8 gives a runtime error at line 134 of rssdisplaybox.js

document.getElementById(this.boxid).innerHTML=rsscontent
if the output is embedded in <li> tags, while it works flawlessy in Firefox. If I delete the <li> tags it works well in IE8 too, but I need them for css customizing purposes. I have found similar problems on Google, so it seems that IE8 sometimes really has a problem with this line of code.

See the example:


<ul class="news_side" >
<li id='LastTwits'>
<script type="text/javascript">
//MAIN FUNCTION: rssdisplaybox("rssfeed_id", "rssbox_id", "rssbox_class")
var showbbc=new rssdisplaybox("miotweet", "bbcid", "bbcclass")
showbbc.set_items_shown(4)
showbbc.set_template("titlesdatestwitter") //Use "titles" template, which outputs title + category
showbbc.start() //Required: start script
</script>
</li>
</ul>




#LastTwits li img {
border: 0px;
height: 34px;
width: 34px;
float: right;
margin-left: 10px;
margin-bottom: 10px;
display: none;
}

#LastTwits li {
list-style-image:url("/img/freccia_twit.png");
}


The above code is working at http://www.flapane.com/


Any hints?
Thanks!

flapane
12-02-2010, 02:57 PM
bump.
It's a pity that IE is the only browser who is constantly giving problems since its early releases.

flapane
04-06-2011, 11:30 AM
Fixed in IE9 (which doesn't seem bad at all)