I'm learning extjs as our application uses it. Right now I've been able to build something like:
blur: function(field, lastValues) {
var vField = field.getValue(),
vFormPanel = field.formPanel;
if (Ext.isEmpty(vField)) {
MsgBox.show({
msgs: [{
type: 'info',
msg: Lang.getCustomFrameworkMessage('Do you want to search google?')
}],
buttons: MsgBox.YESNO,
fn: function(buttonId) {
if (buttonId === "yes") {
var redirect = 'https://google.com'
window.location.href = redirect;
}
}
}
}
}
}
In the above code, when the field is tabbed in and out and is empty, it shows the message box. Instead I want that when the page is loaded, very then the message box should be displayed. How can that be done??