Thursday, May 31, 2007

JavaScript setAttribute vs IE thanks mate you saved me hours of work :-)

short version:

IE seems to have a problem while you use per JavaScript the function setAttribute for the onClick event.

as justin mention, here the solution:

document.getElementById('YourEle').setAttribute('onClick', "myFunc(null);");
/*IE6/7 ISSUE!!!*/
document.getElementById('YourEle').onclick = function() {myFunc(null);};

No comments:

Shared Cache - .Net Caching made easy

All information about Shared Cache is available here: Its free and easy to use, we provide all sources at codeplex.

Facebook Badge