问题
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