• ng.Element.ajax is not available in the Lite version

Self ng.Element.ajax (String url, Object ajax_obj) vs. 1.1.0 FULL ONLY

Requests a URL and set the innerHTML of the HTML Element to the results returned from the server.

This function can fire one of the following custom events:
These events are fired from the HTML Element, not the ng.XHR object.
  • onAjaxReturn: First when the HTML Element makes a successful Ajax request regardless if the results were empty or not.
  • onAjaxUpdate: Fires when the HTML Element makes a successful Ajax request and the results update the content. The function for this event will receive one parameter that holds the results text.
  • onAjaxReturnEmpty: Fires when the HTML Element makes a successful Ajax request and the results are empty.

Parameters

String url Required vs. 1.1.0 Full+Lite
The URL to request.
Object ajax_obj vs. 1.1.0 Full+Lite
A optional JavaScript object that contains the ajax request properties.

Return

Self Required vs. 1.1.0 Full+Lite
The original HTML Element.

Examples

Using ng.Element.ajax(url, obj)
Demo:
Request Status: ng.XHR Status ng.Element.ajax Status
Output will go below this line:

API Menu