This shows you the differences between two versions of the page.
sample_code:using_app.execute [2015/10/30 20:46] pedrod created |
sample_code:using_app.execute [2015/10/31 04:56] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | Webviews are useful where you want to format a dynamic page, for example, you retrieve some data from sqlite and want to display it in a HTML table. | ||
- | If you want to embed links or buttons in the HTML, you need a way to pass data back to DS, use app.Execute | ||
- | < | ||
- | function OnStart() | ||
- | |||
- | { | ||
- | var appjs='< | ||
- | |||
- | // | ||
- | var myjs = '< | ||
- | ' | ||
- | |||
- | |||
- | lay = app.CreateLayout(" | ||
- | |||
- | web = app.CreateWebView(0.8, | ||
- | |||
- | lay.AddChild(web); | ||
- | app.AddLayout(lay); | ||
- | |||
- | var b1 = "< | ||
- | var b2 = "< | ||
- | |||
- | web.LoadHtml(appjs + myjs + b1 + b2); | ||
- | |||
- | |||
- | } | ||
- | |||
- | |||
- | function b_test(x) { app.ShowPopup(x); | ||
- | </ |