Hi,
I am brand new with ExtJS.
I currently have a basic Login form that is supposed to send username and password information to a WCF service that checks the information and returns a custom message object in Json with the format {"success":true , "token": "token_string"}. success is a bool and token is a string in C#.
I know the WCF service works as intended because sending a POST method to the url at which the service is hosted with the appropriate Json message using Fiddler returns the desired output.
However, attempting to submit the information via an Ext Form Submit, it always returns as a failure. In addition, I have the form attempt to output the accept.result, and it always shows up as undefined.
Here is the code for my button click event:
Code:
onButtonClick: function(button, e, options) {if(this.getForm().isValid()){
this.getForm().submit({
method: 'POST',
url: 'url_of_the_service',
success: function(form, action) {
Ext.Msg.alert('Login Successful!');
},
failure: function(form, action) {
Ext.Msg.alert('Login Failure!'+action.result);
}
});
}
}
My main question is: Is there anyway I can see the request this form is sending to the url, using fiddler or other means to see if it is being sent correctly? Also, I want to display the "token" property returned in the Ext.Msg.alert, just to see if everything works correctly. How would I go about doing that?
Thanks for your time.