PDA

View Full Version : Ext.Msg.confirm is not waiting user's Response



tanmayasahu
9 Dec 2013, 12:01 AM
Hi Animal,
I am facing the same issue, My Scenario is I am displaying the confirmation box before selecting the choice from the combobox. In my Case when the user will click the Yes button the value of the combo will be changed, otherwise not. My code is like this
Code :
Ext.Msg.confirm('Changing Status', 'Are you sure you want to change the Status ?', function (id, value) {
if (id === 'yes') {
return true;
}
else{
return false;
}
}, this);
But it is not working. Before clicking on any button of confiramtion dialogue the selected choice setted to the combobox. It means the execution did not wait for the user's response unlike the javascript Confirmation Dialogue.

Need help....Its urgent...Please..Please...

Thanks...

tanmayasahu
9 Dec 2013, 1:25 AM
Hi Everybody,
I found the solution, You have to place the below code in the beforeselect event.
Code :
combo.currVal = record.get('value');
Ext.Msg.confirm('Changing Status', 'Are you sure you want to change the Status ?', function (id, value) {
if (id === 'yes') {
combo.setValue(combo.currVal);
}
}, this);
return false;

Hope it will help someone....
Thanks
Tanmaya

Gary Schlosberg
10 Dec 2013, 10:58 AM
Glad to hear you found a solution, and thanks for taking the time to post a follow-up.