im trying to create a login using extjs with PHP but i stuck up to this problem...
TypeError: this.getView is not a function
this.getView().destroy();
here is my code....
i dont know why it could be error i just try to follow the tutorial in sencha docs
buttons: [{
text: 'Login',
formBind: true,
listeners: {
click: function() {
var form = Ext.getCmp('login').getForm();
if(form.isValid()) {
form.submit({
url : 'data/login.php',
method : 'POST',
success:function(){
this.getView().destroy();
Ext.widget('app-main');
},
failure: function() {
obj = Ext.util.JSON.decode(response.responseText);
Ext.Msg.alert('Login Failed!', obj.errors);
}
});
}
}
}
}]