inAppbrowser和webSql失败 - cordova [英] inAppbrowser and webSql failure - cordova

查看:251
本文介绍了inAppbrowser和webSql失败 - cordova的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用cordova 3.4.1和inAppbrowser。

I'm using cordova 3.4.1 and inAppbrowser.

我正在使用webSql。在页面加载我从数据库中检索一些数据。在那一刻工作正常。接下来按下一些按钮,数据库条目将更新,并会打开 inAppBrowser 窗口。

I'm using webSql. At the page load I'm retriving some data from database. Works fine at that moment. Next with some button press, database entry is updated and a inAppBrowser window is opened.

tx.executeSql('UPDATE tb_comic SET page="'+image_id+'" WHERE id="'+id+'"');

ref=window.open('base.html','_blank','location=no, toolbar=yes, EnableViewPortScale=yes');
ref.addEventListener('exit', iabClose);


function iabClose(event)
{
     alert(event.type);
     ref.close();
     //location.reload(true);
}

然后关闭inAppBrowser窗口后,数据库开始失败。任何查询调用不会给出预期结果。我试图重新加载页面。结果相同。即使在使用 document.location 来转到不同的页面不工作。相同的意外结果。

Then after closing of the inAppBrowser window database starts to failt. Any query call doesn't give the expected result. I've tried to reload the page. Same result. Even after using document.location for going to a different page not working. Same unexpected result.

我注释掉了inAppBrowser调用 window.open ,然后一切正常。每个数据库检索都是预期的。所以我的数据库代码是完美的。 db 引用完全保存在变量内部。没有问题。但是所有的问题在ipAppBrowser调用后开始。

I commented out the inAppBrowser call window.open, then everything works fine. Every database retrieve is as expected. So my database code is perfect. db reference is held inside a variable perfectly. No problem there. But all problem starts after the ipAppBrowser call.

缺少什么?我没有正确关闭inAppBrowser?

What is missing? Am I not closing the inAppBrowser correctly? What is the perfect way to use them both on the same page succesfully?

推荐答案

目前没有解决这个问题的方法。

There is no solution to this problem at present as far as I've found.

查看以下答案链接

路线:
SQLite Plugin

这篇关于inAppbrowser和webSql失败 - cordova的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆