Loading...
 
Load data into a DIV using AJAX or in an IFRAME

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) using AJAX. It also used to include the body of another web page in a wiki page into an HTML IFRAME tag.

Parameters

Load data into an HTML div using Ajax or in an iframe.
Introduced in Tiki 14.1. Required parameters are in bold.
Go to the source code
Preferences required: wikiplugin_ajaxload

Parameters Accepted Values Description Default Since
(body of plugin) JavaScript to run when the data is loaded, the incoming HTML is in a variable called data. You can modify that variable's contents to customise the HTML.
url url Address of the data to load, for example, tiki-index_raw.php?page=Page+Name 14.1
height In pixels or percentage. Default value is auto. auto 14.1
width In pixels or percentage. Default value is 100No value assigned 14.1
class text Class for the div or iframe. 14.1
id text HTML id for the div or iframe. 14.1
selector none jQuery selector to retrieve part of the page when using Ajax, for example, #page-data 14.1
target none Where to load the Ajax data into (will create own DIV if not supplied. When using iframe if JavaScript is disabled it will appear where the plugin is in the page. 14.1
absolutelinks (blank)
src
href
none
Convert relative links in the incoming data to be absolute. Default value is "All". 14.1

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

doc.tiki.org

Get Started

Admin Guide User Guide

Keywords

Keywords serve as "hubs" for navigation within the Tiki documentation. They correspond to development keywords (bug reports and feature requests):

Accessibility (WAI and 508)
Accounting
Articles and Submissions
Backlinks
Banners
Batch
BigBlueButton audio/video/chat/screensharing
Blog
Bookmark
Browser Compatibility
Link Cache
Calendar
Category
Chat
Clean URLs
Comments
Communication Center
Compression (gzip)
Contacts (Address Book)
Contact us
Content Templates
Contribution
Cookie
Copyright
Credit
Custom Home and Group Home Page
Date and Time
Debugger Console
Directory of hyperlinks
Documentation link from Tiki to doc.tiki.org (Help System)
Docs
Draw
Dynamic Content
Dynamic Variable
External Authentication
FAQ
Featured links
File Gallery
Forum
Friendship Network (Community)
Gmap Google maps
Groups
Hotword
HTML Page
i18n (Multilingual, l10n)
Image Gallery
Import-Export
Install
Integrator
Interoperability
Inter-User Messages
InterTiki
Kaltura video management
Karma
Live Support
Login
Logs (system & action)
Look and Feel
Mail-in
Map with Mapserver
Menu
Meta Elements
Mobile Tiki and Voice Tiki
Module
MultiTiki
MyTiki
Newsletter
Notepad
Payment
Performance Speed / Load
Permissions
Platform independence (Linux-Apache, Windows/IIS, Mac, BSD)
Polls
Profiles
Profile Manager
Report
Toolbar
Quiz
Rating
Feeds
Score
Search engine optimization
Search
Search and Replace
Security
Semantic links
Shadowbox
Shadow Layers
Share
Shopping cart
Shoutbox
Slideshow
Smiley
Social Networks
Spam protection (Anti-bot CATPCHA)
Spellcheck
Spreadsheet
Stats
Surveys
Tags
Task
Tell a Friend, alert + Social Bookmarking
TikiTests
Theme CSS & Smarty
Tiki Manager
Trackers
Transitions
User Administration including registration and banning
User Files
User Menu
Watch
WebDAV
Webmail
Web Services
Wiki History, page rename, etc
Wiki Syntax
Wiki structure (book and table of content)
Workspace
WSOD
WYSIWYCA
WYSIWYG
XMLRPC

Tiki Newsletter

Delivered fresh to your email inbox!
Newsletter subscribe icon
Don't miss major announcements and other news!
Contribute to Tiki