Results 1 to 4 of 4

Thread: Enable loadmask Iframe while processing

  1. #1
    Sencha User jassyr's Avatar
    Join Date
    Jul 2014
    Location
    Tunisia
    Posts
    6

    Default Answered: Enable loadmask Iframe while processing

    how to set a loadmask for an Iframe while generating a pdf report
    Code:
    onBtnImprimirClick: function(button, e, eOpts) {        
            var Iframepanel=Ext.create('Ext.ux.IFrame', {
            extend: 'Ext.Component',
            alias: 'widget.uxiframe',
            loadMask: 'Creating report...please wait!',        
            src:'pdf.php',   
                
        });  
            var WinReporte=Ext.create('Ext.Window', {
                title: 'Reporte de Clientes',
                width: 750,
                height: 400,
                layout: 'fit',
                xtype: 'panel',
                modal:true,
                items: Iframepanel
                LoadMask: true
            }); 
    
           WinReporte.show();
        } ,
    I've set loadmask to true, but didn't work!
    Is there anything glaringly wrong here?
    thanks

  2. You should be able to do something like this:

    Code:
    Ext.onReady(function () {
        Ext.widget('panel', {
            title: 'My IFrame',
            width: 700,
            height: 700,
            items: {
                xtype: 'component',
                autoEl: {
                    tag: 'iframe',
                    style: 'height: 100%; width: 100%; border: none;',
                    src: 'muffins-blueberry.pdf'
                },
                listeners: {
                    load: {
                        element: 'el',
                        fn: function () {
                            this.parent().unmask();
                            console.log('done');
                        }
                    },
                    render: function () {
                        this.up('panel').body.mask('Loading...');
                    }
                }
            },
            renderTo: Ext.getBody()
        });
    });

  3. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,409
    Answers
    716

    Default

    You should be able to do something like this:

    Code:
    Ext.onReady(function () {
        Ext.widget('panel', {
            title: 'My IFrame',
            width: 700,
            height: 700,
            items: {
                xtype: 'component',
                autoEl: {
                    tag: 'iframe',
                    style: 'height: 100%; width: 100%; border: none;',
                    src: 'muffins-blueberry.pdf'
                },
                listeners: {
                    load: {
                        element: 'el',
                        fn: function () {
                            this.parent().unmask();
                            console.log('done');
                        }
                    },
                    render: function () {
                        this.up('panel').body.mask('Loading...');
                    }
                }
            },
            renderTo: Ext.getBody()
        });
    });

  4. #3
    Sencha User jassyr's Avatar
    Join Date
    Jul 2014
    Location
    Tunisia
    Posts
    6

    Default resolved

    well done
    thanks

  5. #4

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •