# Ajax Macro Sample

Last modified by etvc developer on 2019/09/21 01:41
Export
Office Formats
Export as PDF
Other Formats
Export as HTML

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

## On demand loading with custom message

click this link to load the content of this div
{{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**
{{/ajax}}

## Automatic loading

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

## Automatic loading of external page

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

## Automatic loading of external URL

Loading...
{{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:

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

## Automatic loading with include

click this link to load the content of this div
Tags:
Created by etvc developer on 2019/09/21 01:41

- Comments (0)
- Attachments (0)
- History
- Information

# Applications

# Tips

You can click on the arrows next to the breadcrumb elements to quickly navigate to sibling and children pages.

# Need help?

If you need help with XWiki you can contact:

- Community Support
- Professional Support

XWiki Debian 11.5