Posted By

pollux on 05/25/09


Tagged


Versions (?)

Fire an Event manually on IE > 5


 / Published in: JavaScript
 

URL: http://www.howtocreate.co.uk/tutorials/javascript/domevents

IE doesn't follow the W3 specification about DOM Events

  1. var srcElement = document.getElementById('source');
  2. if(document.createEventObject) {
  3. var ev = document.createEventObject();
  4. //event object can define common properties (see the URL)
  5.  
  6. //1st param: event type fired, 2nd event object
  7. srcElement.fireEvent('onclick', ev);
  8. }

Report this snippet  

You need to login to post a comment.