Incompatibility with other library

1 reply. Last post: May 8, 2012 12:30 AM by Yudi
Tags :
  • (None)
  • New Discussion
  • New Question
  • New Product Feedback
Tim ByngMember

Hello,

I have an existing project that makes use of both ComponentArt and Intersoft controls. After updating, the pages that have both ComponentArt (Menu) and Intersoft (WebGrid) contorls on them raise the following JavaScript error:

Error: Unable to get value of the property 'notifyScriptLoaded': object is null or undefined

The issue no longer occurs if I remove either one of the components.

I believe both libraries use their own script manager libraries to serve up dynamic client side resources. At the bottom of the Intersoft scripts is the following:

if (typeof(Sys) !== "undefined") Sys.Application.notifyScriptLoaded(); 

I did not see a similar reference in the ComponentArt scripts, but I did see notifyScriptLoaded mentioned a few times in the forums.

In Microsoft's documentation of notifyScriptLoaded, it says the API is obsolete. It also says the following:

Do not call the notifyScriptLoaded method from scripts that are embedded in assemblies. The script resource handler adds an instance of this call, and a second call will cause an error. If you must embed a file that calls notifyScriptLoaded in an assembly, you can prevent an error by setting the NotifyScriptLoaded property of the ScriptReference object that points to the script to false. (The default is true.)

Based on this, if both ComponentArt and Intersoft call notifyScriptLoaded, then the second call will cause an error. I was wondering if this is why I'm getting an error when both controls from ComponentArt and Intersoft are loaded on the same page?

Please note that if I disable the script handler for either library, it works as expected. However, I would prefer to use all features of the library, including performance optimizations through the use of script hanlders.

I am using the latest versions from both vendors.

Please advise.

P.S. I have already reported this to ComponentArt.

P.P.S. This is the third time that I am posting this in this community. I'm trying a shorter subject this time to see if it helps...

All times are GMT -5. The time now is 1:13 PM.
Previous Next