Ajax Macro Sample

Last modified by Clemens Robbenhaar on 2022/11/02

This sample Ajax Macro class shows some delayed loading on demand or automatically

On demand loading with custom message

{{ajax id="1" auto="false" message="click this link to load the content of this div"}}
This content is loaded on demand and can contain **wiki syntax**

Automatic loading

{{ajax id="2" auto="true"}}
This content is loaded automatically and can contain **wiki syntax**

Automatic loading of external page

{{ajax id="3" page="Macros.AjaxMacroSampleContent" auto="true" /}}

Automatic loading of external URL

{{ajax id="4" url="http://localhost:8080/xwiki/bin/view/Macros/AjaxMacroSampleContent?xpage=plain" auto="true" /}}

Automatic loading with appending

This sample shows a what's new box loaded in AJAX with a "more" button to load additional data:

{{ajax id="5" page="Macros.AjaxMacroSampleContent2" auto="true" append="true" nb="2" message="More documents" loadingmessage="Loading... please wait" /}}

Automatic loading with include

Get Connected