javascript load() renders component script instead of chart

  1. #1

    javascript load() renders component script instead of chart

    I have the following Razor code:
    Html.X().Container()
                  .ID("ViewContainer2")
                   .Loader(Html.X().ComponentLoader()
                   .Url(Url.Action("Portlet"))
                    .Mode(LoadMode.Script)
                     .Params(new { containerid = "ViewContainer2" })
     )
    It renders the following chart:
    Click image for larger version. 

Name:	2.PNG 
Views:	12 
Size:	49.9 KB 
ID:	7098

    I use a similar javascript function:
    Ext.get('ViewContainer2').load({
                    url: '/Dashboard/Portlet/',
                   scripts: true,
                   params: {
                       containerid: "ViewContainer2"
                   }
               });
    I get the following result:
    Click image for larger version. 

Name:	1.PNG 
Views:	7 
Size:	27.7 KB 
ID:	7099

    The script does not get render correctly. Is there another command I need to run after the load command. I tried
    Ext.get('ViewContainer2').show();
    but did not work.
  2. #2
    Please use 'Ext.getCmp' instead 'Ext.get' or just 'App.ViewContainer2'
  3. #3

    It worked.

    Quote Originally Posted by Vladimir View Post
    Please use 'Ext.getCmp' instead 'Ext.get' or just 'App.ViewContainer2'

    Thank you. Please close this thread.

Similar Threads

  1. Replies: 2
    Last Post: Jun 27, 2013, 10:18 PM
  2. Replies: 8
    Last Post: Feb 06, 2013, 6:27 PM
  3. [CLOSED] Script tag HTML rendering on first page load
    By seanwo in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Aug 03, 2010, 8:31 PM
  4. Add Ext JavaScript Component to Component
    By geoffrey.mcgill in forum Examples and Extras
    Replies: 3
    Last Post: Mar 10, 2010, 12:38 PM
  5. Replies: 4
    Last Post: Jul 09, 2009, 3:47 PM

Tags for this Thread

Posting Permissions