My problem is very simple as i am a newbie...
I want to display a confirmation dialog that appear when i click on a link : if the user clicks 'Yes' he continues, if he clicks 'NO' he cancel his request.
I found that message boxes were asynchronous so I got to use show method, so I code this :
confirmResult = function(btn) {
if (btn == 'ok')
{
return true ;
}
return false ;
}
Ext.onReady(function() {
Ext.get('logout').on('click', function(e){
e.stopEvent() ;
Ext.Msg.show({
title: 'Confirmation',
msg: 'Are You sure ?',
buttons: Ext.Msg.YESNO,
fn: confirmResult,
animeId: this,
icon: Ext.Msg.QUESTION
}) ;
});
}) ;
When there isn't stopEvent() the user is always redirected, but when there is stopEvent(), nothing happen.
Someone could help me ? I just want to do something simple : ExtJS
Ok I finally got my response by myself : http://extjs.com/learn/Manual:Widgets:MessageBox
This is what i code :
Ext.get('elId').on('click', function(e, target){
Ext.Msg.confirm('Go to this website...',
'Are You sure ?',
function(btn) {
if (btn == 'yes')
{
document.location = target.href ;
}
}) ;
}, this, {stopEvent: true});
Newbie Question: Form Submit is not loading the action file
set FieldValue by Formload |