ForgeComponents
en

Components

j-AjaxLoading

jComponent 20 · jcomponent@20 component Example loaded with jComponent 20

This component can show a loading text for async AJAX operations.

  • works with AJAX() method only

Configuration:

  • url {String} a pattern for URL is evaluated as RegExp, must be defined
  • label {String} optional (default: HTML content)
  • icon {Boolean} adds spinner icon (default: true)

Use it with <ui-component name="ajaxloading">. When the component is not loaded yet, jComponent downloads it on first use from the address in DEF.fallback (the Componentator CDN by default). Author: Peter Širka. Source: the Componentator components repository, MIT license.

example.html
<div style="width:300px">
	<ui-component name="ajaxloading" config="url:/users/" class="hidden">Loading users</ui-component>
	<br />
</div>

<script>
	setTimeout(function() {
		AJAX('GET /users/');
	}, 2000);
</script>