I have an app, that connects with the given host via a form,
where user will give the host details like "http://abc.com" then my code will connect it to the given host.
(function (parent) {
var
/// start global model properties
/// end global model properties
hostname,
hostModel = kendo.observable({
submit: function () {
var hostname = parent.get('addFormData.hostname');
if (hostname != "") {
$.ajax({
url: hostname + '/InstalltionAPI/GetDomain/',
dataType: 'JSON',
type: 'GET',
success: function (args) {
alert("success");
localStorage.setItem("aportWarehouseHost", args.Message);
window.APP.mobileApp.navigate("components/login/view.html");
},
error: function () {
alert("error");
}
});
}
},
});
parent.set('onShow', function _onShow() {
var that = parent;
that.set('addFormData', {
hostname: '',
});
});
parent.set('hostModel', hostModel);
})(app.host);
apart from that every other ajax request is not working... am I missing something?