Warning: Undefined variable $filepath in /home/tiki-doc/public_html/lib/wiki-plugins/wikiplugin_tikidocfromcode.php on line 146
PluginAJAXLoad | Documentation for Tiki Wiki CMS Groupware
Loading...
 
Skip to main content

History: PluginAJAXLoad

Preview of version: 14

Plugin AJAX Load

This wiki plugin, introduced in 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).

Parameters

Tiki Doc From Code error: ajaxload not found

Examples

Basic Example

Copy to clipboard
{AJAXLOAD(url="http://example.com/tiki-index.php" selector="#page-data")}alert(data.length + " bytes of data received"); {AJAXLOAD}

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 ( warning: if you leave out the {literal} tags you will probably make your tiki unusable and will need to edit the database to get it back!).

Copy to clipboard
{literal}{AJAXLOAD(url="tiki-index_raw.php?page=structure+menu+test" selector="#structure_menu")} setTimeout(function () {$("#mod-test_structure_menutopbar1").superfish();}, 500); {AJAXLOAD}{/literal}


Related Plugins: PluginIframe, Pluginincludeurl

History

Information Version
Rodriguez Nyiringabo Improve the doc 15
Rodriguez Nyiringabo Remove the doc related to the javascript pref as no modern site runs without javascript. 14
Josue Zirimwabagabo 13
Benoit Grégoire 12
Jonny Bradley 11
Jonny Bradley 10
Jonny Bradley 9
Jonny Bradley added menu example 8
lindon 7
lindon 6
lindon 5
lindon 4
lindon 3
Jonny Bradley 2
Jonny Bradley 1
Show PHP error messages