Hi All,
Here I am created one function which is calling another function.
The function deleteProcess is created and calling properly from one function and not from another one.
Below is my code for these two functions.
Code:
// Confirm Record function from where delete Process function calls
,confirmDeleteRecord:function(btn){
var str="";
if(btn=='yes'){
for(i = 0; i< array.length; i++){
if(i != array.length-1)
str+=array[i].get('usermanagement_id')+",";
else
str+=array[i].get('usermanagement_id');
//prez.push(array[i]);
}
//var encoded_array = Ext.encode(array);
this.deleteProcess(str);
}
}
// Delete Process function
,deleteProcess:function(strids){
Ext.Ajax.request({
waitMsg: 'Please Wait',
url: script_path + 'usermanagement/usermanagement.php',
params: {
mode:"deleteUser",
ids:strids
},
success: function(response){
//var result=eval(response.responseText);
var o = Ext.decode(response.responseText);
switch(o.success){
case true: // Success : simply reload
//this.onRender();//Refresh grid
store.reload({params:{start:0,limit:number_of_records}});
break;
default:
Ext.MessageBox.alert('Warning','Could not delete the entire selection.');
break;
}
},
failure: function(response){
var result=response.responseText;
Ext.MessageBox.alert('error','could not connect to the database. retry later');
}
});
}
Thanks
Hiral