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 --
Many different reasons can cause a Cannot Init Control error. It is usually due to controls not being able to find the JavaScript files necessary to initialize. This can be cause the embedded resources are blocked (which the above method solves), script are not found in the location they are being looked for (move scripts to that location or change where the files are being looked for), or JavaScript is disabled on the browser.
For the second case, it only applies when you are using our CLR 1.x controls or when you have the JavaScriptFileName and/or JavaScriptFileNameCommon properties set for a control. If you are using CLR1.x the JavaScript files would be looked for (by default) in the ig_common virtual directory. In CLR 2.x and up, we started embedding the scripts in the dlls so that these files would no longer be necessary to deploy. On the other hand if the JavaScriptFileName and/or JavaScriptFileNameCommon is set then it would not use the embedded resources and instead would look for those scripts at the path those properties point to. There is also a web.config redirect that will tell the controls to not use embedded resources and instead look for the scripts in the specified folder (Knowledge Base Article above shows how this can be done).
To resolve the last case, it is a matter of enabling JavaScript on the brower.
The simplest way to see what your application is doing is do view the source of the page by doing a "View Source" off the context menu and looking for the axd or the js extensions. If its using axds, I would check browser settings and your IIS settings. If you are using js files then see where it looking for those files and why it is (web.config or property settings). As you can see from the history of this thread, there also seems to be some cases where slow internet speeds can cause a similar issue.
Also, you can create a brand new application with a simple control to see if it is related to that specific application.
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.
Applied above steps but still showing infragistic java script error.
I am using windows 2003 and iis 6.0.
Pls anybody give me the quick respone.
Thanks in advance.
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?
Thanks Simon