PDA

View Full Version : Ext.Ajax.Request problem with safari



HugoEsteves
23 Feb 2012, 7:59 AM
Hi,

I have a problem with my application running in safari windows version(windows 7), i have a login aspx page that executes an ajax.request to validate the user it is calling the same login aspx page but with the a param "option" but most of the times when i do the Request.Params.Get("option") in c# code(login.aspx.cs) the "option" param is null, in other browsers (firefox, chrome,IE) this works fine only happens in safari.

The extjs version is 4.0.1

the Ext.ajax.request that im doing in login.aspx.



Ext.Ajax.request({
url: 'login.aspx',
method: 'POST',
params: {
option: 'login'
},
success: function(response) {
try {
var result = Ext.decode(response.responseText);
if (result.erro != null && result.erro != undefined) {
Ext.MessageBox.show({
maxHeight: 450,
autoScroll: true,
draggable: false,
closable: false,
msg: result.erro,
modal: true,
buttons: Ext.Msg.OK,
icon: Ext.Msg.ERROR
});
} else {
window.location.href = result.urlPage;
}
} catch (e) {
Ext.MessageBox.show({
maxHeight: 450,
autoScroll: true,
draggable: false,
closable: false,
msg: e.message,
modal: true,
buttons: Ext.Msg.OK,
icon: Ext.Msg.ERROR
});
}
},
failure: function(response) {
var result = response.responseText;
bodyMask.hide();

Ext.MessageBox.show({
maxHeight: 450,
autoScroll: true,
draggable: false,
closable: false,
msg: response,
modal: true,
buttons: Ext.Msg.OK,
icon: Ext.Msg.ERROR
});
}
});


And in the login.aspx.cs the Request.Params.Get("option") is null




protected void Page_Load(object sender, EventArgs e)
{
String opcao = Request.Params.Get("option");
...
....
.....
}



Has anyone had a similar problem or know why this happens and what i have to do to fix it?

P.S i tried running in the safari version of the ipad and in that version this works fine.

mitchellsimoens
23 Feb 2012, 8:44 AM
Have you checked the network tab to see what is being sent?

HugoEsteves
23 Feb 2012, 9:29 AM
Have you checked the network tab to see what is being sent?

Hi,

Yes, i checked the network tab and the param option apears correctly, do you have any idea what could be the problem?

Regards

mitchellsimoens
23 Feb 2012, 9:37 AM
If the option param is ok in the request then I it's something with the server. Either a header is causing something or another issue.

casic
14 Jul 2012, 8:51 AM
I have a script with ajax request and in the web server work normaly. When i start sencha app build native , teh generated web package and the native .apk don't work.
Can any one help ?
Thanks in advance .