Madiyana
19 Nov 2012, 6:07 AM
Hi,
I try to change one function for addind Ext.Ajax.Request but I hava a promblem with my url ..
In my function I use document.location = '' and when i take the 'url' and add it in the Ext.Ajx.Request ,
My function :
PS : I take just a part in my function , the part where I do it
if(btn=='yes'){
var box = Ext.MessageBox.wait('Traitement en cours ...');
var arrayIds = [];
Ext.each(grilleResultat.selModel.getSelection(), function(e){
arrayIds.push(e.data.Id_Amn);
});
var jsonLstIds = Ext.JSON.encode(arrayIds);
document.location = '/gedeo/amenagement/genererpdf/array/'+jsonLstIds;
box.hide();
}
},
And this code with Ajax
if(btn=='yes'){
var box = Ext.MessageBox.wait('Traitement en cours ...');
Ext.Ajax.request({
url : '/gedeo/amenagement/genererpdf/array/'+jsonLstIds,
params : { jsonLstIds : jsonLstIds },
success : function(response, opts){
box.hide();
},
failure : function(response, options){
}
});
// document.location = '/gedeo/amenagement/genererpdf/array/'+jsonLstIds;
}
If someone can help me Pliz.;
Thanks
I try to change one function for addind Ext.Ajax.Request but I hava a promblem with my url ..
In my function I use document.location = '' and when i take the 'url' and add it in the Ext.Ajx.Request ,
My function :
PS : I take just a part in my function , the part where I do it
if(btn=='yes'){
var box = Ext.MessageBox.wait('Traitement en cours ...');
var arrayIds = [];
Ext.each(grilleResultat.selModel.getSelection(), function(e){
arrayIds.push(e.data.Id_Amn);
});
var jsonLstIds = Ext.JSON.encode(arrayIds);
document.location = '/gedeo/amenagement/genererpdf/array/'+jsonLstIds;
box.hide();
}
},
And this code with Ajax
if(btn=='yes'){
var box = Ext.MessageBox.wait('Traitement en cours ...');
Ext.Ajax.request({
url : '/gedeo/amenagement/genererpdf/array/'+jsonLstIds,
params : { jsonLstIds : jsonLstIds },
success : function(response, opts){
box.hide();
},
failure : function(response, options){
}
});
// document.location = '/gedeo/amenagement/genererpdf/array/'+jsonLstIds;
}
If someone can help me Pliz.;
Thanks