Below is my code to open the home.html page upon successful login for my Android app. But when I click the login button it loads the same index.html page (It isn't opening home.html
).
function check(form) {
//the following code checkes whether the entered userid and password are matching
if(form.password.value == "moleac123") {
if(form.remember_me.checked) {
window.localStorage["password_remember"] = "moleac123";
var date_to_remember = new Date().getTime();
window.localStorage["date_remember"] = date_to_remember.toString();
}
$.mobile.pageLoadErrorMessage = "";
// window.open('home.html'); //opens the target page while Id & password matches
window.location="home.html";
}
else {
alert("Invalid Password"); //displays error message
$.mobile.pageLoadErrorMessage = "";
// window.open('index.html');
window.location="index.html";
}
}
I got the below error on my logcat. (Note my query mobile version is 1.3.2 and I have tried to upgrade to 1.4.5 still the same issue occurs)
Error:
D/JsMessageQueue﹕ Set native->JS mode to null D/CordovaWebViewImpl﹕ onPageDidNavigate(file:///android_asset/www/home.html)
W/BindingManager﹕ Cannot call determinedVisibility() - never saw a connection for the pid: 20994
D/CordovaWebViewImpl﹕ onPageFinished(file:///android_asset/www/home.html)
W/BindingManager﹕ Cannot call determinedVisibility() - never saw a connection for the pid: 20994
W/BindingManager﹕ Cannot call determinedVisibility() - never saw a connection for the pid: 20994
Note- This works fine in Android 4.1.X version, it has this issue in Android5.0
Please advice how I could fix this.