parel
30 Aug 2007, 8:33 AM
Hello, i don't know what is going on, i have a grid with a toolbar (as shown in the picture) that works in this way:
Altas(add): When you click this icon it opens a Ext.LayoutDialog and show's me a form, then i just put some values hit save, then the form reloads and that's it, it works great on any browser.
The problem is on the Editar(edit) action, when i want to edit some value i have to select a row then hit the edit button and a Ext.Layoutdiaglo opens with the information of the item in a form, the problem is, that it work's on every browser except IE7, on IE7 the form start to load the information and goes blank (as shown in the other picture), can someone help me?
This is the code that i use to select the row:
rsm.on('rowselect', function (g,indexRow){
valorIndexSelect = grid.dataSource.getAt(indexRow).data.presentacionid;
},this);
Then this is the code for the edit toolbar button:
simpleToolbar.addButton({
text: 'Editar', id:'editarItem', cls: 'x-btn-text-icon botonEdicion', handler : function(o,e){
editaDialog.show('editarItem');
formEdita.load({url:'../../xml/xmlPresentaciones.php?accion=5&presentacionid=' + valorIndexSelect , waitMsg:'Cargando'});
}
});
This is the code for the edit form:
grid.on('rowdblclick',function(g,indexR,e){
editaDialog.show('editarItem');
formEdita.load({url:'../../xml/xmlPresentaciones.php?accion=5&presentacionid=' + valorIndexSelect , waitMsg:'Cargando'});
},this);
formEdita = new Ext.form.Form({
method: "post",
labelWidth: 85,
buttonAlign: "right",
reader : new Ext.data.XmlReader({
record : 'item',
success: '@success'
}, [
{name: 'presentacionid'},
{name: 'presentacion'}
]),
url: "../../xml/xmlPresentaciones.php",
labelSeperator:"",
buttonAlign: "center",
waitMsgTarget : true
});
formEdita.add (new Ext.form.TextField({
name: "presentacion",
fieldLabel: "Presentacion",
width: 155,
allowBlank: false
}));
function doSubmit(){
formEdita.url = "../../xml/xmlPresentaciones.php?accion=2&presentacionid=" + valorIndexSelect;
formEdita.submit();
editaDialog.hide();
}
formEdita.addButton("Actualizar", function() {
doSubmit();
});
formEdita.render("formuEdita");
formEdita.on("actioncomplete",function(t,a){
if(a.type != 'load'){
datagrid.load({params:{start:0, limit:15}});
grid.getView().refresh();
}
},this);
formEdita.on("actionfailed", function(t,a) {
this.ocultaEdit;
},this);
This is the code for the edit LayoutDialog
editaDialog = new Ext.LayoutDialog("editForm",{
modal: true,
width:320,
height:150,
shadow:true,
resizable:false,
proxyDrag: true
});
Altas(add): When you click this icon it opens a Ext.LayoutDialog and show's me a form, then i just put some values hit save, then the form reloads and that's it, it works great on any browser.
The problem is on the Editar(edit) action, when i want to edit some value i have to select a row then hit the edit button and a Ext.Layoutdiaglo opens with the information of the item in a form, the problem is, that it work's on every browser except IE7, on IE7 the form start to load the information and goes blank (as shown in the other picture), can someone help me?
This is the code that i use to select the row:
rsm.on('rowselect', function (g,indexRow){
valorIndexSelect = grid.dataSource.getAt(indexRow).data.presentacionid;
},this);
Then this is the code for the edit toolbar button:
simpleToolbar.addButton({
text: 'Editar', id:'editarItem', cls: 'x-btn-text-icon botonEdicion', handler : function(o,e){
editaDialog.show('editarItem');
formEdita.load({url:'../../xml/xmlPresentaciones.php?accion=5&presentacionid=' + valorIndexSelect , waitMsg:'Cargando'});
}
});
This is the code for the edit form:
grid.on('rowdblclick',function(g,indexR,e){
editaDialog.show('editarItem');
formEdita.load({url:'../../xml/xmlPresentaciones.php?accion=5&presentacionid=' + valorIndexSelect , waitMsg:'Cargando'});
},this);
formEdita = new Ext.form.Form({
method: "post",
labelWidth: 85,
buttonAlign: "right",
reader : new Ext.data.XmlReader({
record : 'item',
success: '@success'
}, [
{name: 'presentacionid'},
{name: 'presentacion'}
]),
url: "../../xml/xmlPresentaciones.php",
labelSeperator:"",
buttonAlign: "center",
waitMsgTarget : true
});
formEdita.add (new Ext.form.TextField({
name: "presentacion",
fieldLabel: "Presentacion",
width: 155,
allowBlank: false
}));
function doSubmit(){
formEdita.url = "../../xml/xmlPresentaciones.php?accion=2&presentacionid=" + valorIndexSelect;
formEdita.submit();
editaDialog.hide();
}
formEdita.addButton("Actualizar", function() {
doSubmit();
});
formEdita.render("formuEdita");
formEdita.on("actioncomplete",function(t,a){
if(a.type != 'load'){
datagrid.load({params:{start:0, limit:15}});
grid.getView().refresh();
}
},this);
formEdita.on("actionfailed", function(t,a) {
this.ocultaEdit;
},this);
This is the code for the edit LayoutDialog
editaDialog = new Ext.LayoutDialog("editForm",{
modal: true,
width:320,
height:150,
shadow:true,
resizable:false,
proxyDrag: true
});