I'm not sure if this is the right forum for this, (I posted this also in the Config / Deploy forum) but can anyone tell me why I often get a "Can not init Button", "Can not init Tab", "Can Not init Grid" java scritp error message?
Often I get the little "warning" error message in the bottom left corner of IE. If I double click the yellow "yield sign" I'll get a message that tells me basically that at Char N Line X can not init control. Then the browser window stops responding to all javascrip, I can't click a button, double click a grid view row, etc.
When viewing the source of the page, I see the javascript Try/Catches and the error message, but I still don't know what is causing it.
Has anyone seen this before, any ideas on what could cause it and what I can do to fix it.
Thanks
-- Joe --
This can occur due to numerous causes but is usually due to the same problem. The message you report usually entails that the scripts for the controls are not being loaded and when the intialization scripts are run, the functions for initializing cannot be found. What is the context of the behavior you see? Did you just upgrade? Is this a brand me application? What version of our controls are you using in what development environment?
For a quick fix (that may not fix your issue ) you can just redirect the scripts by using the technique in the following Knowledge Base:
http://devcenter.infragistics.com/Support/KnowledgeBaseArticle.aspx?ArticleID=6158
Also, make sure you do not have the JavaScriptFileName and JavaScriptFileName properties set if you are working with the CLR 2.0 or CLR 3.5 NetAdvantage controls. This will ensure that the control uses the scripts that are embedded as resources in the dlls. In CLR 1.x this is necesssary as the scripts are not embedded.
If you are runnign this through IIS, there is a setting that needs to be set for files with axd extensions so that the embedded resources can be used.
If you get this intermittently then it may have somethign to do with errors in your script or possibly something to do with AJAX if you are using any. Again, a lot of this depends on the context in which the error occurs.
We are running Version=6.3.20063.1072. The application is a little over a year old. What is the reallly frustrating part is that this problem doesn't always happen. In fact it is pretty infrequent, but when it does happen it prevents my users from effectively using the page.
And it only seems to affect users at our remote sites. From my office where the web server is located 20 feet from me I never see the "Can't init" error.
The context in which these errors happens varies widely, but usually when loading a grid with data. Users are assigned cases and each case is a record in their worklist (grid).
I'll take a look at that KB article. Can you tell me which setting in IIS that needs to be set to allow the axd extensions to work properly? Not using any Ajax, but I do make use of the Async ability of the WebTab and use Warp panels on a couple of other pages.
I don't think that it is a script error, simply because I can open the user's worklist on my PC and have no problem, then PC Anywhere into the user's PC and bring up the same worklist and I have a problem. Also there was a problem opening a case where the user encountered the "Can't Init ..." error. Then two days later, with no code changes, the error stopped occuring!
Maybe somehow the axd file is not being transmitted fully to the client or gets corrupted in some way?
Intermittent issues are always fun.
From your description it seems it may be due to connection speeds. You may be able to reproduce the issue if you are able to test over a really slow connection. I searched around and found that Fiddler has the capability to simulate modem speeds. You may also want to try extending the timeout of the WARP and WebTab controls. It is by default 20 seconds but it can be configured via JavaScript to your own value. The following Knowledge Base will show you how to change that timeout value:
http://devcenter.infragistics.com/Support/KnowledgeBaseArticle.aspx?ArticleID=10043
All the other potential causes I mentioned should not apply to your situation since the application is one that works consistently. My recommendations were for situations in which the application was new, upgraded, or a recently deployed.
Can you tell me the setting in IIS that you were referring to in you first post?
Is there anything I can do for pages that don't have a WebTab or Warp panel? Thanks for the KB link, this was something that I implemented a while ago for my main "Case" page that contains my WebTab.
I have to admit that I don't know much about those axd files, but is there anyway I can have the page wait for those files before any execution takes place?
Thanks for your responses and all of your help.
This will be for XP or IIS 5.1. It will probably be somethign similar in another OS.
Open IIS -> right click on application and go to Properties -> go to Virtual Directory tab -> Click on Configuration button -> Go to Mappings tab on dialog -> click on .axd from the list and click the edit button -> make sure that the "Check that file exists option" is not checked.
Again, this shouldn't matter as if that was checked your application would not work when using any embedded resources.
For the other pages I can't say for sure. I tried to reproduce using Fiddler but was not sucessful so it may or may not be the issue or it may not be slow enough.
Hello,
I am having this same problem today on one of my web applications.
I have a certain application that gives the 'Can Not Init Error' whilst trying to load any page that uses an UltraWebMenu control. This is an issue in both IE6 and Firefox but it appears to work fine in IE7.
I have checked another application that uses UltraWebMenu's (and works) and I cannot see any obvious differences.
I have checked the things mentioned in the posts above ('.axd', JavaScriptFileName, Ajax) but I cant see anything wrong.
Any ideas?
Thanks Simon
One thing I can think of is browser settings. Try setting it to the default settings and see if it resolves any issues. You can also do a view source on the page to see where it is looking for the scripts (either *.js or *.axd). Solutions that involve redirecting or setting up IIS are for situations where it is not deployed or set up correctly on the server.
The problem we were having with the 'Can Not Init Button' error has gone since we changed application server. The application was exactly the same on both boxes so i believe it is an IIS or permissions error of some kind. Hope this helps.
The other application works fine in IE6 and Firefox. We have had an issues with 1 perticular version of IE6 (an old version which some office machines were still using) with Infragistics controls, but aside from that there have been no problems.
We are using version 7.3 of the controls in both applications.
This problem started appearing after we moved the applications onto a new server, so I believe it is a setup issue rather than a browser setting issue. I spent all of yesterday looking through the installation, comparing the Virtual Directories, Web.Configs etc.. with no joy...
The menu that works, the one with lots of data, does that work fine in IE6? Or does it generate the same errors? Do the other IG controls work in IE6 or FireFox? I haven't really played around with it, but Firebug should let you actively debug the JavaScript to step through and try to debug the problem. What version of the controls are you using?
Just some things that I can think of off the top of my head. Let me know what you find.
Thanks for the quick responses,
I have viewed the source and it is looking at '.axd' (See below).
<script src="/People/WebResource.axd?d=qLIF0VruY3Bmvg6XUiL4hw2&t=633410945027343750" type="text/javascript"></script>
Also I have tried to changing the browser settings back to Default and that did not solve the issue.
The other Application I have which uses UltraWebMenu's is almost exactly the same, except the other application is much slower (lots more data) so I think I can rule out the speed issues.
Is there anything else at all you can think of?