troubleshooting Question

Not implemented error in IE

Avatar of cavtel
cavtel asked on
Web Browsers
6 Comments1 Solution984 ViewsLast Modified:
Hi,

I'm having this problem just for IE (I'm using IE8). The code works fine in all the other browsers (Firefox, Safari, Chrome). Here is a snippet

// I've a div with id='div_a'

window.onload = function() {
  var elem = document.getElementById('div_a');
  elem.onclick = dosomething(elem);
}

function dosomething(obj) {
  if( !obj ) return;
  obj.onmousedown = function() {
    // doing something over here
  }
}

Please note that window.onload is actually pointing to a function object. It is the same as doing the following (which yielded the same 'Not implemented' error in IE):-

window.onload = init;

function init() {
  var elem = document.getElementById('div_a');
  elem.onclick = dosomething(elem);
}

ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 6 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 6 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros