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

      0  

    Default Unanswered: ExtJS Form Howto

    Unanswered: ExtJS Form Howto


    Hello,

    i use the desktop-example for my own project. When i define a new window, i use the "loader"-property to show another url in my window. but finally, when i open the window, i see only the rendered html, not the forms, i defined in the javascript-tag.

    My question: how to use the loader to display a form in my window? Btw: i set the "scripts"-property to true.

    Thanks for your help.

    Regards,

    Cid


    The .js-file:
    Code:
    win = desktop.createWindow({
         id: '...',
         title: '...',
         width: 640,
         height: 480,
         iconCls: '...',
         animCollapse: false,
         border: false,
         hideMode: 'offsets',
         loader: {
             url: MyDesktop.Catalyst.uri_for('/.../...'),
             autoLoad: true,
             scripts: true
         }
    })
    The Catalyst-Template:
    Code:
    <script type="text/javascript">
      Ext.onReady(function() {
        Ext.create('Ext.panel.Panel', {
          layout: {
            type: 'accordion',
            animate: true
          },
          items: [{
            xtype: 'form',
            id: '...',
            frame: true,
            title: '...',
            plain: true,
            ...

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,085
    Answers
    675
    Vote Rating
    467
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    See if this will produce the result you are looking for:

    Code:
    Ext.onReady(function() {
        myPanel = Ext.create('Ext.Panel', {
            width: 300,
            height: 100,
            title: 'Title',
            layout: 'vbox',
            frame: true,
            renderTo: Ext.getBody(),
            items: [
                {
                    xtype: 'button',
                    text: 'Click to open window',
                    handler: function(b, e) {
                        var myWin = Ext.create("Ext.window.Window", {
                            title: 'HTML Window',
                            modal: true,
                            html: '<iframe src="http://dev.sencha.com/deploy/ext-4.1.0-gpl/examples/form/field-types.html" width="100%" height="100%" ></iframe>',
                            width: 700,
                            height: 500
                        });
                        myWin.show();
                    }
                }
            ]
        });
    });
    Scott.‚Äč

Thread Participants: 1

Tags for this Thread