I created Aspx login page and ext js login form in it
ExtJs code
Ext.onReady(function () {
var loginForm = Ext.create('Ext.FormPanel', {
id: 'login-form',
url:"Login.aspx",
method: 'POST',
renderTo: container,
frame: true,
title: 'Login to EvalueX',
bodyPadding: '5px 5px 0',
bodyStyle: 'padding:15px;background:transparent',
width: 450,
fieldDefaults: {
labelWidth: 125,
msgTarget: 'side',
autoFitErrors: false
},
defaults: {
width: 300
},
defaultType: 'textfield',
items: [
{
fieldLabel: 'User Name',
name: 'user',
id: 'user',
allowBlank: false
},
{
fieldLabel: 'Password',
name: 'pass',
allowBlank: false // id of the initial password field
}
]
,
buttons: [{
text: 'Login',
id: 'btnLogin',
handler: function () {
if (loginForm.getForm().isValid()) {
url: "Login.aspx",
Ext.getCmp('btnLogin').disable();
loginForm.getForm().submit({
method: 'POST',
// waitMsg: 'Uploading your file...',
// or using a progress bar
failure: function (form, action) {
Ext.getCmp('btnLogin').enable();
showLoadingImage(false);
alert(action.result.errors.reason);
}
});
}
// Ext.getCmp('login-form').getForm().submit({ waitMsg: 'Please wait...' });
}
}
]
});
});
Aspx. Code it’s simple Server.Transer.
I receive an error .”You are trying to decode invalid json “
Sumbit Request does not arrive to server
But when I referrence to different aspx page that the page the load form is placed
it’s working
I created a separate asp and submit the file and it’s worked ok