[CLOSED] "True is not defined" javascript error

  1. #1

    [CLOSED] "True is not defined" javascript error

    I recently moved our ASP.NET Web project that uses Ext.Net controls to another VS 2010 solution and suddenly I have "True is not defined" javascript error and ext:TreePanel doesn't show at all on aspx page.

    Here is the error in firebug's console window:
    True is not defined
    Ext.net.ResourceMgr.init({id:"ctl00$...ontent_tpOrgSturcture.expandAll();}); 
    
    And earlier, I saw an error something like this:
    SCRIPT5009: 'True' is undefined
    
    The same source code works fine in our old solution though. I went through web.config, checked references for Ext.net library as suggested in this post: http://forums.ext.net/showthread.php...ght=web.config. Everythings seems fine. Next thing I tried to comment out some js functions and ext.Net controls to the point of leaving just bare ext:TreePanel with no data, menus and listeners on it. I was able to see that bare control without error.

    After spending few hours on this, could you point me to the right direction to resolve this problem please.
    Your support is much appreciated!
    Last edited by Daniil; Aug 11, 2011 at 8:17 PM. Reason: Please use [CODE] tags, [CLOSED]
  2. #2
    Hi,

    I guess there should be lowercase "true". But I'm not sure what can render "True".

    Please use this technique to localize what causing the problem:
    How to reduce a sample

    Then please post the code which causing the error.
  3. #3
    Hi Daniil,

    I've been able to pinpoint this problem to this code (simplified) in .cs file:
         
    bool IsPrimary = true;
    Ext.Net.TreeNode childNode.CustomAttributes.Add(new ConfigItem("IsPrimary", IsPrimary.ToString()));
    Sorry, when I said the same source code between projects that was true to .aspx file, not .cs. Commenting out that line above makes that error go away, but new question is how to add boolean value in ConfigItem? Is there documentation for Ext.Net objects for .Net side?

    Thanks!
  4. #4
    Quote Originally Posted by coleg123 View Post
    how to add boolean value in ConfigItem?
    Please use JSON.Serialize().
    new ConfigItem("test", JSON.Serialize(true))
    Quote Originally Posted by coleg123 View Post
    Is there documentation for Ext.Net objects for .Net side?
    Please follow:
    http://docs.ext.net/

    Unfortunately, it's not fully filled, but there are many things.
  5. #5
    Thanks, Daniil, for excellent support! The issue is resolved for me.

Similar Threads

  1. Replies: 5
    Last Post: Jun 19, 2012, 9:06 PM
  2. [CLOSED] Hidden="true" behaves as Visible="false"
    By marco.morreale in forum 2.x Legacy Premium Help
    Replies: 5
    Last Post: May 28, 2012, 3:17 PM
  3. Replies: 5
    Last Post: May 02, 2012, 5:37 PM
  4. Replies: 11
    Last Post: Mar 30, 2011, 2:21 PM
  5. Replies: 0
    Last Post: Mar 29, 2011, 5:32 PM

Posting Permissions