AddThis on IE – Object doesn't support this property or method


AddThis is a great service – it allows robust integration with online services, e.g. Facebook, Twitter, LinkedIn, What you need to do is to get your button’s code on AddThis homepage and use it in your project. Additionally you can configure the widget; you can refer to AddThis API, where you can find needed information and examples.

I created a component which I included on a couple of pages. I was very happy to use it until I started testing my pages on different browsers. It turned out there was a problem on IE (only; why didn’t that surprise me…); in two of three places it worked just fine but in one place I was getting JavaScript error:


As usual JavaScript error message on IE gave little (if not zero) information on the error. The only statement to give was the problem was on AddThis side. Unfortunately debugging their code was not the best case because the referenced library was obfuscated and (rather not) dedicated to a human being.


Because the problem occured on one page only it was reasonable that some DOM structure or referenced JavaScript code broke it. So I removed piece by piece from that page and at the end it turned out was I used AddThis widget inside this

I renamed the ID of that div to something else, which FIXED THE PROBLEM.

Now, of course I could use a different ID of that div but why should I be forced to do so? I’d consider this issue as a bug in AddThis; if their code creates or uses DOM elements with some divs, they should be given unique IDs, e.g. a hash. Only this way can they be sure they can save a few ours to a person who tries to use their (REALLY NICE) feature.

Previous Post
Next Post