guest [95.90.223.65]  Sun, 03 Nov 2019 09:18:14 +0000

Modified page: https://wiki.horde.org/Doc/Dev/CheatSheet
New Revision:  6
Change log:  JS

@@ -24,8 +24,18 @@
 $GLOBALS['registry']->applications[$app]['jsuri'];

Note: This is most likely not what you want. Use the template & js loading mechanism instead

++ Servicing JavaScript
+
+++ Load a file from app or horde base
+
+$page_output->addScriptFile('jquery-ui/jquery-1.9.0.min.js', $app);
+
+++ Forward backend variable data to js
+
+$page_output->addInlineJsVars($data);
+This is useful for dynamic initialisation of Single Page Applications. Solves chicken - egg: Provide dynamic data the js needs to know but cannot (yet) get via ajax. Think of tokens or API Urls.


 ----
 Back to the ((Project|Project List))

--
commits mailing list
Frequently Asked Questions: http://wiki.horde.org/FAQ
To unsubscribe, mail: commits-unsubscr...@lists.horde.org

Reply via email to