Attributes and functions of the Anaa framework.
© 2007-2012 - Sandrine Takis & Denis Sureau - GNU GPL 2.0 license.
The attribute is set to true if caching is allowed, or false if it is not allowed.
You should leave it on false, but for files that are rarely modified. Disabling caching reduces performances on big files, but enabling it could produce bad results.
This method is called by other methods to create an XMLHttpRequest object.
Return: An XMLHttpRequest object.
Called to read a document.
The type of the document is determinated by the extension. Any extension that ends by "ml" (xml, xhtml, etc...) should be XML compatible. Other extensions are supposed to be plain text files.
A JSON file should have a json or js extension and is a text file.
function AARead(url, callback, element)
Load an XML file with any extension.
function AALoadXML(url, callback, element)
Loads the content of a HTML page into a variable or a tag in the currently
displayed page. This allows to access the data of the other page by methods
of the Document Object Model.
Before to call the function, you have to declare a variable or create a tag to store the content.
The function calls a user-defined function passed as argument, that processes the body of the HTML page loaded.
The param argument may be the id of a div tag where to store the extracted data.
Look at the demos for details about the use of this function.
function AALoadHTML(url, callback, id, param)
Called to send data to a script on the server.
function AAWrite(url, data [, function] )
Read the header of a file.
function AAHead(url, key, function, element)
Extract the content of the body tag from a string holding a web page, so got by the XHR object.
Return: A string, the part of the page in the body tag.
Free, open source, under the GPL 2.0 license.
You can use the library freely, extend it if you want, but do not remove the copyright notice.