We're rolling out a redesign of helpcurenow, and we've implemented a Twitter feed in the footer. (I'm the design & front end guy, my coworker is the scripting & backend guy).
All is well with the Twitter feed in all major browsers except internet explorer, version 8 and later.
However we have no clue why IE is not pulling the feed at all. Any hints??
/ (look in footer)
We're rolling out a redesign of helpcurenow, and we've implemented a Twitter feed in the footer. (I'm the design & front end guy, my coworker is the scripting & backend guy).
All is well with the Twitter feed in all major browsers except internet explorer, version 8 and later.
However we have no clue why IE is not pulling the feed at all. Any hints??
http://betawww.helpcurenow/ (look in footer)
Share Improve this question edited Jun 15, 2010 at 19:55 Marcel Korpel 21.8k6 gold badges62 silver badges80 bronze badges asked Jun 15, 2010 at 19:42 Joel GlovierJoel Glovier 7,68910 gold badges54 silver badges87 bronze badges1 Answer
Reset to default 3Found it! The problem is with the li.innerHTML =
assignment. Basically, you're feeding the Twitter script a template somewhere, which looks like
"<li class="ftr-tweet"><p>%text%</p><a href="http://twitter./%user_screen_name%/statuses/%id%" class="ftr-tweetTimestamp">%time%</a></li>"
But unfortunately, Twitter already created a <li>
and only wants to get its inner HTML. What happens now is that you insert a <li>
into the Twitter-created <li>
... which most browsers accept, but IE8 doesn't. It simply won't accept incorrect HTML, which is of course a very noble principle for Microsoft. See http://www.theogray./blog/2009/06/internet-explorer-unknown-runtime-error.
So the solution is leaving the li out of your template. But then you won't have the ftr-tweet
class anymore... So replace it with a <span>
and all's well with the world.
"<span class="ftr-tweet"><p>%text%</p><a href="http://twitter./%user_screen_name%/statuses/%id%" class="ftr-tweetTimestamp">%time%</a></span>"