Quantcast
Channel: Internet Explorer Web Development forum
Viewing all articles
Browse latest Browse all 3527

Both addEventListener and attachEvent do not work in IE 11 Compatibility View.

$
0
0

function createObject_Log(id){
    var obj = document.createElement('object');
    if(id!='') obj.id = 'objAttach' +  id;
    obj.classid = "CLSID:9BD19BD1-D8F9-4D1D-8AD9-42C21A2B28DC";
    obj.HaveAttachment = false;
  
    obj.attachEvent('AttachmentAdd',function(fileName, fileFullName){AttachmentAddEvent_Handler(obj, fileName, fileFullName)});
    return obj;
}

function AttachmentAddEvent_Handler(sender,filName,fileFullName){   
     var type = "SaveAttach" ;
     var SendStr = sender.AttachmentData;
     var AttachmentInnerID = (sender.innerID?sender.innerID:"00000000-0000-0000-0000-0000-000000000000");
     
     var AttachmentName =  filName;
   
     sender.HaveAttachment = true;    
    
     sender.innerID = SendToServer_Att(type,SendStr,AttachmentInnerID,AttachmentName);
}

The ActiveX Control can be displayed on the page, but the event call back code dose not work. Do we have any other option to make the code work in IE11 Compatibility View? 


Viewing all articles
Browse latest Browse all 3527

Trending Articles