History: PluginAJAXLoad
Source of version: 15 (current)
- «
- »
Copy to clipboard
!Plugin AJAX Load This ((wiki plugin)), introduced in ((Tiki14|Tiki14.1)), can be used to load HTML into a wiki page, from another page on the same site or an external site (when used in combination with the access_control_allow_origin pref on __Control Panels -> General -> Settings__) using AJAX. It also used to include the body of another web page in a wiki page into an HTML IFRAME tag. {autotoc activity="yes" title="" levels="2:3" align="page" mode="off"} !! Parameters {pluginmanager plugin="ajaxload"} !!Examples !!! Basic Example {CODE(colors="tiki")}{AJAXLOAD(url="http://example.com/tiki-index.php" selector="#page-data")}alert(data.length + " bytes of data received"); {AJAXLOAD}{CODE} !!! Superfish menu from a structure In order to make page loading faster you can use -+AJAXLOAD+- to load a menu from a structure asynchronously. Put the menu in a module in a page (here called "structure menu test") and add this to a ''wiki enabled'' custom module (here called "test_structure_menu") and assign it to the topbar module zone (~~#F90:{icon name="warning"}~~ warning: if you leave out the -+~np~{literal}~/np~+- tags you will probably make your tiki unusable and will need to edit the database to get it back!). {CODE(colors="smarty")}{literal}{AJAXLOAD(url="tiki-index_raw.php?page=structure+menu+test" selector="#structure_menu")} setTimeout(function () {$("#mod-test_structure_menutopbar1").superfish();}, 500); {AJAXLOAD}{/literal}{CODE} Related Plugins: ((PluginIframe)), ((Pluginincludeurl))