자바스크립트/Ext JS2011. 6. 27. 16:30
var helpWindow = Ext.create('Ext.Window', {
        title: 'Source code',
        width: 920,
        height: 500,
        closeAction: 'hide',
        renderTpl: [
                   ],
        listeners: {
            render: function(w) {
                Ext.Ajax.request({
                    url: 'dragdropzones.js',
                    success: function(r) {
                        w.body.dom.value = r.responseText;
                    }
                });
            }
        }
    });
// 또는 
Ext.Ajax.request({
    url: 'gen-invoice-grid.php',
    // send additional parameters to instruct server script
    params: {
        startDate: Ext.getCmp('start-date').getValue(),
        endDate: Ext.getCmp('end-date').getValue()
    },
    // process the response object to add it to the TabPanel:
    success: function(xhr) {
        var newComponent = eval(xhr.responseText); // see discussion below 여기에 주목 ㅋㅋ
        myTabPanel.add(newComponent); // add the component to the TabPanel
        myTabPanel.setActiveTab(newComponent);
    },
    failure: function() {
        Ext.Msg.alert("Grid create failed", "Server communication failure");
    }
});
</pre>
<br />

'자바스크립트 > Ext JS' 카테고리의 다른 글

form 요소 전체 보기  (0) 2011.07.01
ExtJs Ajax  (0) 2011.06.27
isReader'은(는) null 이거나 개체가 아닙니다.  (3) 2011.06.22
[ExtJS] Proxy  (0) 2011.05.21
[ExtJS] 어플리케이션 뼈대 만들기.  (0) 2011.05.20
Posted by 베니94