inAppbrowser and webSql failure - cordova

自闭症网瘾萝莉.ら 提交于 2020-01-06 02:38:16

问题


I'm using cordova 3.4.1 and 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);
}

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.

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.

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


回答1:


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

View the answers on the following link

Way around: SQLite Plugin



来源:https://stackoverflow.com/questions/24030946/inappbrowser-and-websql-failure-cordova

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!