PDA

View Full Version : Ext.window not opening in Mozilla Firefox V3.6.3



krishnaathul
3 May 2010, 3:46 AM
Hi,
I am new to extjs, I have a requirement to open the grid inside a pop up window.
in IE 7 the Ext.window is opened with out any issue but its not opened in Mozilla Firefox V3.6.3
below given is the code

Ext.onReady(function() {

var win;
var button = Ext.get('show-lookUp');
var dynamicCodeType;
var store = new Ext.data.Store({
proxy : new Ext.data.HttpProxy(new Ext.data.Connection({
url : '/InfoService/servlet/CodeInfoServlet'
})),

reader : new Ext.data.JsonReader({
totalProperty : 'total',
root : 'rows',
fields : ['code', 'codeDesc']
}),
remoteSort : true
});

var pagingBar = new Ext.PagingToolbar({
pageSize : 10,
store : store,
displayInfo : true,
displayMsg : '{0} - {1} of {2}',
emptyMsg : "No result to display"
});

store.on({
'beforeload' : {
fn : function(store, options) {
Ext.apply(options.params, {
dynamicCode : Ext.get('dynamicCodeType').dom.value
});
}
}
});


var sm = new Ext.grid.CheckboxSelectionModel();

var grid = new Ext.grid.GridPanel({
//applyTo : 'pagingJson-grid',
store : store,
sm : sm,
id : 'codeInfoGrid',

columns : [sm, {
header : 'Code',
width : 120,
dataIndex : 'code'
}, {
header : 'Code Desc',
width : 120,
dataIndex : 'codeDesc'
}],

viewConfig : {
forceFit : false
},
title : 'Code Info',
width : 280,
height : 300,
stateful : false,

bbar : pagingBar
});


var searchText = new Ext.form.TextField({
fieldLabel : 'Search',
name : 'searchField'
});


button.on('click', function() {
dynamicCodeType = Ext.get('dynamicCodeType').dom.value;
store.load({
params : {
start : 0,
limit : 10,
dynamicCode : dynamicCodeType,
searchField : Ext.get('searchFieldFromBase').dom.value
}
});
if (!win) {
win = new Ext.Window({
applyTo : 'codeInfo-grid',
layout : 'fit',
width : 300,
height : 300,
closeAction : 'hide',
plain : true,
border : false,
items : grid,
buttons : [searchText, {
text : 'Search',
handler : function() {
store.removeAll();
store.load({
params : {
start : 0,
limit : 10,
searchField : Ext.get(searchField).dom.value,
dynamicCode : dynamicCodeType
}
});
}
}, {
text : 'Select',
handler : function() {
selectedRows();
store.removeAll();
win.hide();
}
}]
});
}
grid.render();
win.show(this);
});
});

Animal
3 May 2010, 4:57 AM
grid.render?

What does the API doc for the render method tell you?