Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
465
Javascript "error" - Can Not Init Control (Button, Grid, Tab, etc)
posted

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 --

Parents
  • 10880
    posted

    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 Big Smile) 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.

Reply Children