Answer the question
In order to leave comments, you need to log in
Ajax authorization?
I'm trying to make authorization through Ajax using ExtJS
Input form:
form = Ext.create("Ext.form.Panel",{<br>
url: "/login",<br>
items:[{<br>
xtype: "textfield",<br>
name: "login",<br>
fieldLabel: "Login"<br>
},{<br>
xtype: "textfield",<br>
name: "password",<br>
fieldLabel: "Password"<br>
}],<br>
buttons:[{<br>
text: "Submit",<br>
handler: function(){<br>
if(form.form.isValid()){<br>
form.form.submit({<br>
success: function(a,b){<br>
window.location.reload()<br>
},<br>
failure: function(a,b){<br>
Ext.Msg.alert("Ошибка!", b.result.response)<br>
} <br>
})<br>
}<br>
}<br>
}]<br>
})<br>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question