Difference between revisions of "Passing parameters to Web Apps"
From Lianjapedia
Barrymavin (Talk | contribs) |
Barrymavin (Talk | contribs) |
||
Line 16: | Line 16: | ||
</code> | </code> | ||
− | [category:Tips And Tricks] | + | [[category:Tips And Tricks]] |
Latest revision as of 15:41, 26 December 2017
In the ready delegate of your Web App you can access the arguments specified on the URL.:
If (typeof LianjaAppBuilder !== "undefined") return; // ignore in development mode var query_string = ""; var href = window.location.href; var pos = href.indexOf("?"); if (pos > 0) query_string = href.substring(pos+1); var argv = query_string.split("&"); for (var i=0; i<argv.length; ++i) { arg = argv[i].split("="); argname = arg[0]; argvalue = arg[1]; }