Following MessageBox Examples, but different result
January 6th, 2009
var actionCancel = new Ext.Action({
text: 'Cancel',
handler: function(){
Ext.MessageBox.confirm('Please Confirm','Are you sure you want to Cancel and lose all changes?',
function(btn){
alert(btn); //This alerts "1" always
if(btn == 'yes'){
//do yes event
}
}
);
}
});
However I'm finding at the alert within the message box function always alerts the value "1" no matter which option is selected (yes or no). I even copy/pasted the code again directly from the Ext example, and I get the same result (when it is inside my action).
Is that not the correct way of approaching this?
Thanks for any help you can provide!
This would be weird, though. It's the first Action I've added into the page, the rest of the Ext is just simple panels and a toolbar.
What Browser are you using?
So the only thing left is that it must be something in my page conflicting with the button? Any ideas on where to start (:
We have some custom JS as well as CSS, I can try and start commenting out some stuff until it seems to behave properly.
So much for being simple :s
#If you have any other info about this subject , Please add it free.# |