Wikia

WoWWiki

AjaxTables/doc

Talk0
100,547pages on
this wiki

Template page | < Template:AjaxTables | Redirected from Template:Ajax/doc

Provides AJAX functionality for table content.

ParametersEdit

Only one parameter is completely required:

|target=
Target page, loaded when show data link is clicked.

All other parameters only customize the table appearance:

|width=
Sets the width of the table. Default is 100%.
|headstyle=
The CSS style of the table head. Default is none.
|head=
The actual text in the table head. Default is blank, but head will still show so that the JavaScript will have somewhere to put the [edit] [show/hide] links.
|bodystyle=
CSS style of the table's content cell, applies to both before and after the loading of the table data. Default is none.
|bodyload=
Used to have the AJAX load trigger in the body cell. Wrap the text you want users to click with [link][/link] in this parameter. Default is none.
|default=
Body text when bodyload is not defined; does not provide body loading text (load data link is in table head). Default is none.
|nojs=
What users see when they have JavaScript disabled (which is of course required for AJAX operation). Defaults to:
This table requires JavaScript to be enabled and site tooltips to be turned on to be displayed.
You can also [[{{{target|none}}}|view the data]] on another page.
|mainstyle=
Allows setting table's class to something besides "darktable". Defaults to..."darktable".
|nohead=
If this parameter is set to anything besides a null value, the head is not displayed (including the show/hide/edit links). You should use |bodyload= when using this.

Target page syntaxEdit

Tabular data should be wrapped in a table on the target page. Table formatting should be applied on the target page, not on the calling page.

You can enclose data in <span class="ajaxHide"></span> on the target page to hide it on the calling page.

ExamplesEdit

Examples use Template talk:AjaxTables/include as their target.


This table requires JavaScript to be enabled and site tooltips to be turned on to be displayed.
You can also view the data on another page.


The data for this table is not yet loaded.
Click "show data" to load data.
This table requires JavaScript to be enabled and site tooltips to be turned on to be displayed.
You can also view the data on another page.


The data for this table is not yet loaded.
[link]Click here[/link] to load data.
This table requires JavaScript to be enabled and site tooltips to be turned on to be displayed.
You can also view the data on another page.

Around Wikia's network

Random Wiki