I wanted to load the login page as soon as the the connection to the database has been made but FW7's ajax doesn't work.
myApp.onPageInit('splash-screen', function (page) {
myApp.alert("LOADED");
$$.ajax({
url: "http://192.168.1.8:80/saklolo-php/dbconfig.php",
successs: function (data, result) {
if (result == "success") {
if (data != "error") {
mainView.router.loadPage('login.html');
} else {
myApp.alert("Please check your network connection..");
}
} else {
myApp.alert(result);
}
},
error: function (jqXHR, error) {
myApp.alert("Status: " + jqXHR.status);
myApp.alert(error);
}
});
});
How do I know that the AJAX doesn't work? Well the alert on top of it works so the page has initialized but the ajax doesn't work, I hope someone could help me.