Sign in to follow this  
Rahul Kumar

Microsoft JScript runtime error: Object required (IE7)

Recommended Posts

When closing the browser (IE7 running with the "disable script debugging" setting unchecked) on a page with fusion charts on it, the browser throws multiple runtime errors:

 

 

 

A Runtime Error has occurred.

 

Do you wish to Debug?

 

Line: 52

 

Error: Object required

 

 

 

Debugging through visual studio I get the following:

 

 

 

function __flash__removeCallback(instance, name) {

 

instance[name] = null;

 

}

 

 

 

where the values are:

 

--> intance = null

 

--> name = "setDataXML"

 

--> output = "Microsoft JScript runtime error: Object required"

 

 

 

In the callstack, the call to the above function is as follows:

 

 

 

__flash__removeCallback(document.getElementById(""), "setDataXML");

 

 

 

Seems like for each chart on the page it throws exactly 4 runtime errors. (This is the enterprise version 3.0 charts)

 

 

 

Any ideas on how to fix this would be greatly appreciated. Again, you will only see this bug if IE is running with script debugging enabled.

 

 

 

(I also noticed that this is only an issue when you have registerWithJS = 1)

Edited by Guest

Share this post


Link to post
Share on other sites

Our code here is pretty messy. But I think I found root cause of this bug. There's a thread on it here:

 

 

 

http://bugs.adobe.com/jira/browse/FP-529

 

 

 

We are using jQuery which might be interfering with the cleanup processes of the flash files in IE. It seems like this would be a simple fix by just changing the __flash__removeCallback method to be like so:

 

 

 

function __flash__removeCallback(instance, name)

 

{

 

if ( instance )

 

{

 

instance[name] = null;

 

}

 

}

Share this post


Link to post
Share on other sites

After doing some digging, I found this in another forum post which seems to fix my problem in IE7:

 

 

 

window.attachEvent("onbeforeunload",fcRemoveChart);

 

function fcRemoveChart() {

 

var arr = document.all.tags("object");

 

if (arr && arr.length) {

 

for (var i=arr.length-1; 0<=i; i--) {

 

arr.removeNode(true);

 

}

 

}

 

}

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this