下面是我的代码,用于在成功登录我的 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 中有这个问题
请告诉我如何解决这个问题。
你试过了吗this ?在那篇文章的 logcat 中,有一些关于 BindingManager: Cannot call determinedVisibility()
的内容所以也许建议的解决方案在这里也有帮助?
我是一名优秀的程序员,十分优秀!