One of our customers reported that some ASP.NET Ajax controls generate on the page links of the form
Code:
 <a href="javascript:doSomething()">Click</a>
This could be a problem due to an issue on Internet Explorer.

A simple workaround to this issue could be the following code that changes the <a> tags in order to place the javascript call on the onclick event:


Note that this code is only needed on the "attachEvent" case so you can easily modify it if you don't want it to run on "addEventListener" browsers (e.g. Firefox).
You can also "improve performance" extracting the anonymous function that creates the closure.

You can use this method on the entire document

or just on the tag that contains the links to be modified