Hi there I followed theis article on how to use web.config to change the directory locations but I get the following script load error:
---------------------------Error---------------------------A Runtime Error has occurred.Do you wish to Debug?Line: 3311Error: Sys.ScriptLoadFailedException: The script 'JS/NetAdvantage/20081CLR20/Scripts/ig_shared.js' failed to load. Check for: Inaccessible path. Script errors. (IE) Enable 'Display a notification about every script error' under advanced settings. Missing call to Sys.Application.notifyScriptLoaded().---------------------------Yes No ---------------------------
in my web.config I've got the following entries:
<section name="infragistics.web" type="System.Configuration.SingleTagSectionHandler,System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
...
<infragistics.web imageDirectory="JS/NetAdvantage/images" javaScriptDirectory="JS/NetAdvantage/20081CLR20/Scripts" cssDirectory="JS/NetAdvantage/20081CLR20/Styles" formsDirectory="JS/NetAdvantage/20081CLR20/Forms" />
Things to note:
And this is where I run out of ideas....
Any help greatly apreciated!
Hello Emil,
Thanks for writing and for the detailed information you have given. I am currently trying to reproduce the problem (I assume the grid is initially invisible and then it gets visible in a certain situation. The grid is placed inside the ContentTemplate of an asp:UpdatePanel).
While I still have not been able to reproduce that (I keep trying), I do have one suggestion. Is it possible, that the ASPX page hosting the grid (or the user-control / master-page, etc) is not directly in the root of the application? In this case the javaScriptDirectory setting will be relative to the ASPX page and not relative to the root, hence the possible failure to load the scripts (if JS is directly in the root)
Maybe you can try the tilde slash syntax "~/JS/NetAdvantage..." to specify the locations? Will this help?
Meanwhile I keep trying to reproduce the issue, so I can figure out what is going on.
Please, let me know if this helps.
Hi Rumen,
Thank you for your suggestions, but I can't use absolute paths like "~/JS/NetAdvantage..." because the app is always going to be deployed in a virtual directory which name will vary so it has to be relative. That works for me anyway.
I have resolved my problem - it was a valid AJAX script exception. Here I'll add my two cents as they say:
REASON: This is to do with the fact that after partial page postbacks scrips load asynchronously and then we need to notify Sys.Application that the script has been loaded and parsed. (This relates only to the ASP.NET AJAX Toolkit framework)
SOLUTION: Adding the following script at the end of every Infragistics script file loaded on that page fixed my problem.
if(typeof(Sys) !== "undefined" && typeof(Sys.Application) !== "undefined") Sys.Application.notifyScriptLoaded();
if(typeof(Sys) !== "undefined" && typeof(Sys.Application) !== "undefined")
Sys.Application.notifyScriptLoaded();
QUESTION: What I still don't understand is why this problem started after I changed the script location from the default "ig_common" virtual directory to the custom one specified in web.config ??? Anyone who knows the reason for this?