I am trying to use a Javascript callback for a Flex application embedded in my page. Looking through some examples, I saw this code used to get a link to a Flex application:
function thisFlexApp(appName) {
if(navigator.appName.indexOf ('Microsoft') != -1) {
return window[appName];
}
else {
return window.document[appName];
}
}
var someVariable = thisFlexApp('NameOfFlexApp').callbackMethod();
I used this method, but using IE9 I got errors indicating that calling thisFlexApp is not working. It turns out that window.document [appName] worked in IE9, but window [appName] did not. Since I do not expect my government clients to use IE9, I wonder which version of IE will work on this method? Is there any other test that is better to use instead of the one above, which assumes that all versions of IE work in a certain way? Thanks in advance.