1. #1
    Sencha User
    Join Date
    Mar 2012
    Posts
    3
    Vote Rating
    0
    theWalli is on a distinguished road

      0  

    Question Unanswered: How to load external page which uses extjs

    Unanswered: How to load external page which uses extjs


    Hi,

    I have to load a external web page into a panel/winow in my application, but I only get the HTML and normal JS content. Ext.js doesn't work as it does, if I visit that site with my browser. "launch: function()" doesn't work, App-Folder-path is unknown etc.

    How I can load the normal html and js content:
    Code:
        loadApp3: function () {
            var window = Ext.create('Ext.window.Window', {
                title: 'Example 1',
                width: 600,
                height: 400,
                autoLoad: {
                    url: 'view',
                    scripts: true,
                },
                closable: true
            }).show();
        }
    This is the web page i try to inlude in my application:
    HTML Code:
    <!DOCTYPE html>
    <html>
    <head>
       <title>index</title>
         <link rel="Stylesheet" type="text/css" href="../../Scripts/Ext/resources/css/ext-all.css" />
         <script type="text/javascript" src="../../Scripts/Ext/ext-debug.js"></script>
    </head>
    <body>
     This is visible.
    </body>
    </html>
    <script type="text/javascript" src="../../Scripts/ExtDesigner/MovieDatabase/designer.js"></script>
    and this is the Ext.Application that doesn't execute:
    Code:
    Ext.Loader.setConfig({
        enabled: true
    });
    
    Ext.application({     //everything in here is ignored
        name: 'MovieDatabase',
        appFolder: 'Scripts/ExtDesigner/MovieDatabase/app',
    
        controllers: [
            'AppLoader'
        ],
    
        stores: [
            'MovieStore'
        ],
    
        launch: function () {
            Ext.QuickTips.init();
    
            var cmp1 = Ext.create('MovieDatabase.view.MovieList', {
                renderTo: Ext.getBody()
            });
            cmp1.show();
        }
    });
    alert("This shows up");
    I hope someone has a hint for me to get back on the track.
    Thanks!

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    St. Louis, MO
    Posts
    33,582
    Vote Rating
    433
    Answers
    3101
    mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of

      0  

    Default


    You are trying to use autoLoad on a window loading another Ext JS 4 app?
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    http://www.JSONPLint.com - Source to lint your JSONP!

    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Mar 2012
    Posts
    3
    Vote Rating
    0
    theWalli is on a distinguished road

      0  

    Default


    Yes, I'm trying to create a structure of my extjs application similar to the Northwind app (http://mvc.ext.net/).
    It works with all it's features in one application, but allows to view just a single component too. (see http://mvc.ext.net/Order/OrderList/ )

    The only way i can achiev this is to use something like:
    Code:
        addMovie: function () {
            Ext.create('Ext.window.Window', {
                title: 'Add Movie',
                height: 264,
                width: 442,
                layout: 'fit',
                html: '<iframe width="100%" src="view/movieDetails" style="height:100%;border:0"></iframe>',
                closable: true
            }).show();
        },
    But I think this isn't a good way to put such things in the html attribute.
    For example i can't use the loading mask without autoload.