We have a native ios app, where we need to integrate a HTML5 site (jquery mobile and zurb foundation), which uses ajax-calls on some button clicks.
When we test the code in a browser or on iPhnoe (added to home screen) it all works well. But when we integrate the site in the native app using a webview, the ajax-calls does't seem to work.
Does anyone have a clue why and how to fix this?
$.ajax({
type: "POST",
url: "/ajaxpro/MySolution.Controls.SignUpBox,MySolution.WebApplication.ashx",
datatype: 'json',
data: '{"email" : "' + email + '", "name" : "' + name + '"}',
cache: false,
beforeSend: function (xhr) {
xhr.setRequestHeader("X-AjaxPro-Method", "SignUpBox");
},
success: function (dataString) {
var o = null;
eval("o = " + dataString + "*" + "/");
var data = $.parseJSON(o);
$.each(data.Response, function () {
$('#signUpMessage').text(this.Message);
});
},
error: function (s) {
$('#signUpMessage').text('Something went wrong');
}
});