Results 1 to 3 of 3

Thread: ExtJs 3.4. Closing window doesn't work in IE

  1. #1
    Sencha User
    Join Date
    Aug 2012
    Posts
    12

    Default ExtJs 3.4. Closing window doesn't work in IE

    I'm using ExtJS version 3.4. After Ajax request, if it successfull - I need to close current window. For this I use window.close() function. It works for FF, Safari, Chrome, but not works for IE. I've trying to use hide() and destroy() functions but they not works too. Here is my code:

    Code:
    EditWindow = Ext.extend(GenericWindow, {
    
        initComponent: function () {
    
            var me = this;
            var form = new EditForm({
                supplierId: this.initialConfig.id,
                url: urls.edit_supplier.replace("{id}", this.initialConfig.id)
            });
    
            var config = {
                width:500,
                height:450,
                cls:'editSupplierWindow',
                iconCls:'icon-edit',
                title:msg.suppliers_edit_window_title,
                border:false,
                layout:'fit',
                form:form,
                items:[form],
                buttons:[
                    {
                        text:msg.common_save,
                        cls:'edit-supplier-save-btn',
                        scope:this,
                        handler:function (options) {
                            if (this.form.getForm().isValid()) {
                                var data = Ext.util.JSON.encode(this.form.getForm().getValues(false));
                                Ext.Ajax.request({
                                    url:this.form.getForm().url,
                                    method:'POST',
                                    jsonData:data,
                                    closeAction:'close',
                                    headers:{'Content-Type':'application/json'},
                                    closeAction:'hide',
                                    failure:function (form, action) {
                                        console.log("Error save data on server");
                                    },
                                    success:function (form, action) {
                                        console.log("Data successfully saved");
                                        me.close();
                                    }
                                });
                            } else {
                                Ext.MessageBox.alert('Errors', 'Please fix the errors noted.');
                            }
                        }
                    },
                    {
                        text:msg.common_cancel,
                        cls:'edit-supplier-cancel-btn',
                        scope:this,
                        handler:this.close
                    }
                ]
            };
    In IE console no any JS errors. Any ideas?

  2. #2
    Sencha User
    Join Date
    Aug 2012
    Posts
    12

    Default

    I'm found the error reason!!! It happens bacause I use "console" object, but IE haven't it. I've remove console.log and it works.

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

    Default

    This is a known issue. Thanks for the update.

    Scott.

Posting Permissions

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