Technically it is possible to add events to an iframe but there are some caveats especially in terms of browser compatibility. for starters what I have found is that you can use the window object if you are trying to attach to events such as blur, drop, and mouse or keypress.
ifrme = document.getElementById ( 'ifrme'); if ( typeof ( ifrme.contentDocument ) != "undefined" ){ var win = ifrme.contentWindow||iframe.defaultView; var doc = win.document; win.addEventListener ( "blur",function(){ alert ( "blur"); },false); }
More to come soon