PDA

View Full Version : Top bar Button not working in IE6



edinho77
6 Oct 2009, 8:00 AM
I have a grid with a tbar button that is supposed to call a function when pressed but on IE6 it does nothing. I tried to debug it with Firebug Lite, and IE Developer toolbar but nothing appears in the console. It works fine on FF and IE7.
Here is a simplified version of the code.



var ajaxReader = new Ext.data.JsonReader({
root: 'results',
totalProperty: 'total',
id: 'id'
},[
{name: 'id', type: 'int', mapping: 'id'},
{name: 'estado', type: 'string', mapping: 'estado'}
]);

var pSolicitudes = new Ext.data.HttpProxy({
url: '../ws/pap/wGetSolicitudesPAP.php',
method: 'POST'
});

// The main grid's store
var sSolicitudes = new Ext.data.Store({
proxy: pSolicitudes,
baseParams:{ start:0, limit:500},
reader: ajaxReader
});


Ext.onReady(function(){

Ext.QuickTips.init();

var xg = Ext.grid;

// DIV donde es renderizado el formulario
var fGrilla = Ext.get("fGrilla");

function okok(){
alert('asd');
}

var bAprobar = new Ext.Toolbar.Button({
icon: '../themes/deepblue/btn_cpp_approvedeploy_over.gif',
handler: okok
});


// The main grid in all it's configuration option glory
var grid = new xg.EditorGridPanel({
store: sSolicitudes,
enableColumnHide:false,
enableColumnMove:false,
autoHeight: true,
loadMask:{msg: 'Cargando datos...',removeMask:true},
tbar: ['->',
bAprobar
],
listeners : {
render : function(){
this.loadMask.show();
var store = this.getStore();
store.load.defer(100,store, [ {params:{start:0, limit:25} }]);
},
delay: 100
},
columns: [

{
header: "Estado",
width:90,
sortable: true,
dataIndex: 'estado'
}
]
});

grid.render(fGrilla);



});


Any help will be appreciated.

zhegwood
6 Oct 2009, 9:20 AM
I don't see Ext.Toolbar.Button in the docs... If you change that to Ext.Button does it work?

edinho77
6 Oct 2009, 9:51 AM
thanks for your reply.
You are right. It's from ext-1.0.1 documentation.
But it still doesn't work with Ext.Button.
I'm using ext js 3.0.

edinho77
6 Oct 2009, 10:54 AM
I finally found where the problem was.
Ext.QuickTips.init();

When I commented that line the problem dissapeared.

I didn't search inside Quicktips to find anything else for those who really need to use them. But I hope this helps someone.