mmangino/facebooker2 — Issue #77: IE8: Unable to get value of the property 'appendChild': object is null or undefined
Author: jeffsteil
Created: 2012-03-05 15:43:01+00:00
State: open

I really like the facebooker2 plugin, keep up the great work! I'm receiving this javascript error when displaying a page using facebooker2 in IE8. It works fine in IE9 and all other browsers, but is failing consistently in IE8 both ssl and non-ssl. I am using facebooker2 0.0.16

The that is throwing the error is line 40 in lib/facebooker2/rails/helpers/javascript.rb:

```javascript
document.getElementById('fb-root').appendChild(e);
```

It appears to not be able to find the div with an id of "fb-root" even though it is inserted into the document on line 23 and I'm not sure why. My fix at the moment locally when playing around with this is to add an if statement around line 40 to not perform appendChild if it can't find fb-root but I don't think that is a permanent solution.

Are you able to recreate this in IE8? Thanks. Jeff