RSS 2.0
Journal / Blog
Sunday, September 02, 2007
Goodbye Technorati, Hello Comments from IE - Comments from Internet Explorer 6 & 7 now work on this site. The problem: JavaScript from Technorati
Visitors using Internet Explorer (6 & 7) were unable to post comments on this site (my site runs dasBlog) ever since I added a JavaScript snippet from Technorati.

The Problem in More Details: For visitors using IE (Internet Explorer 6 & 7) dasBlog's "Save Comment" button wouldn't fire, hence the web form wouldn't submit, and the comment wouldn't be posted. When dasBlog's Captcha feature was enabled the Captcha validation wouldn't fire, and again the form would not submit. When JavaScript was disabled in Internet Explorer, dasBlog / ASP.NET would revert to server side validation, the web form would submit, and the comment would be saved. Everything worked fine in Firefox and Opera.

A wild goose chase: I'm using a ASP.NET 1.x version of dasBlog converted to ASP.NET 2.0, and customized to run on a medium trust environment. I initially assumed that something had been corrupted during the ASP.NET 1.x to 2.0 conversion - I thought that some of the ASP.NET client side scripts had been corrupted, or that somehow this ASP.NET 2.0 application was referencing some older ASP.NET 1.x scripts. This assumption proved to be fruitless. I then started looking at Jeff Atwood's Captcha control as the source of the problem, but after disabling the Captcha my "Save Comment" button still didn't work. It had to be something else, I thought that it was a bug with dasBlog, but upon downloading the latest release of dasBlog 2.0 (kudos to the dasBlog team!), I noticed that I could post comments to my site when using any theme other than my own. I started looking at my theme, I disabled my JavaScript links and discovered...

The Solution: a JavaScript linked from Technorati was preventing my comments from being saved. I removed the conflicting script - Goodbye Technorati, Hello Comments from IE.

I wish I would have figured this out sooner, hopefully this article will help anyone else with a similar problem (dasBlog's "Save Comment" button doesn't work). I'll be looking closer at the Technorati script and post another entry here with my findings. In the meantime look through the conflicting script yourself at: http://embed.technorati.com/embed/93ja2gejnr.js

Update: The second line of Technorati's JavaScript causes ASP.NET's postback to fail - ASP.NET can only have one form tag declaration.

The rough JavaScript:
document.write('<form id="te_s" method="post" ... 

Page rendered at Friday, September 05, 2008 8:23:59 PM (GMT Standard Time, UTC+00:00)