# ExternalInterface addCallback issue with IE

**URL:** <https://forum.kirupa.com/t/externalinterface-addcallback-issue-with-ie/288450>\
**Category:** web dev\
**Created:** [May 15, 2009, 8:23pm UTC](https://forum.kirupa.com/t/externalinterface-addcallback-issue-with-ie/288450 "2009-05-15T20:23:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![diparc](https://avatars.discourse-cdn.com/v4/letter/d/ee59a6/32.png) [@diparc](https://forum.kirupa.com/u/diparc)\
**Post date:** [May 15, 2009, 8:23pm UTC](https://forum.kirupa.com/t/externalinterface-addcallback-issue-with-ie/288450/1 "2009-05-15T20:23:37Z")

</div>

I am having an issue with IE when using ExternalInterface and addCallback method -

i use extjs for portlets and the flex app is inside the portlet window. all communication with the flex app is fine till I move/maximize the portlet in which i have the chart(swf).

Once i move/maximize, I can no longer invoke the callback method from javascript. it seems to be loosing the connection with the flex application.  
it is the same if i use fabridge.js

I get a javascript error - “unknown exception”/“unspecified error”, on the line in bold -

function \_\_flash\_\_addCallback(instance, name) {  
instance[name] = function () {  
\*\* return eval(instance.CallFunction("\<invoke name=""+name+"" returntype=“javascript”\>" + \_\_flash\_\_argumentsToXML(arguments,0) + “\</invoke\>”));\*\*  
}  
}

I am doing exactly as mentioned in the flex dev guide. here are snippets of my code:

here is what i have in the html:

\<object classid=“clsid ![](http://forum.kirupa.com/uploads/kirupa/1495/f1fea26928e562b8.gif)27CDB6E-AE6D-11cf-96B8-444553540000”  
id=“mSWF” width=“298” height=“239”  
codebase=“[http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab](http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab)”\>  
\<param name=“src” value="/flex/m.swf" /\>  
\<param name=“flashvars” value=""/\>  
\<param name=“quality” value=“high” /\>  
\<param name=“allowScriptAccess” value=“sameDomain” /\>  
\<embed src="/flex/m.swf" quality=“high”  
width=“298” height=“239” name=“mSWF”  
align=“middle”  
play=“true”  
loop=“false”  
quality=“high”  
allowScriptAccess=“sameDomain”  
type=“application/x-shockwave-flash”  
pluginspage=“[http://www.adobe.com/go/getflashplayer](http://www.adobe.com/go/getflashplayer)”  
flashvars=""\>  
\</embed\>  
\</object\>

javascript functions - this is for different browsers-

function getFlexApp(appName) {  
if (navigator.appName.indexOf (“Microsoft”) !=-1) {  
return window[appName];  
} else {  
return document[appName];  
}  
}

then from another js function, i call

var flexApp = getFlexApp(“mSWF”);  
flexApp.load(v);

Thanks & Regards,  
diparc
