【发布时间】:2015-07-24 06:15:46
【问题描述】:
下面是我在成功登录我的 Android 应用程序后打开 home.html 页面的代码。但是当我单击登录按钮时,它会加载相同的 index.html 页面(它没有打开 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";
}
}
我的 logcat 出现以下错误。 (注意我的查询移动版本是 1.3.2,我尝试升级到 1.4.5 仍然出现同样的问题)
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
注意-这在 Android 4.1.X 版本中运行良好,在 Android5.0 中存在此问题
请告诉我如何解决这个问题。
【问题讨论】:
标签: android jquery-mobile