Access Alloy database from WebView script #13627
-
The index.xml contains a webView with reference to /assets/test/webview.html. The webview inserts a javascript file from same directory. Is it possible to access Alloy database from this js file? views/index.xml:
assets/test/webview.html
assets/test/test.js
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
They live in different folders. You can try this PR #13229 to access a different folder or simply copy it inside your test folder at runtime. You still would need to use a sqlite library to work with it in your page. I would read it in Ti and pass in the data (doing that for charts). If you do more work: just create a normal Ti layout instead of a webview |
Beta Was this translation helpful? Give feedback.
They live in different folders. You can try this PR #13229 to access a different folder or simply copy it inside your test folder at runtime. You still would need to use a sqlite library to work with it in your page.
I would read it in Ti and pass in the data (doing that for charts). If you do more work: just create a normal Ti layout instead of a webview