[ Index ]
 

Code source de Typo3 4.1.3

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/t3lib/ -> class.t3lib_ajax.php (sommaire)

Contains the class "t3lib_ajax" containing functions for doing XMLHTTP requests to the TYPO3 backend and as well for generating replys. This technology is also known as ajax. Call ALL methods without making an object! IMPORTANT NOTICE: The API the class provides is still NOT STABLE and SUBJECT TO CHANGE! It is planned to integrate an external AJAX library, so the API will most likely change again.

Author: Sebastian Kurfuerst <sebastian@garbage-group.de>
Poids: 131 lignes (4 kb)
Inclus ou requis:0 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 1 class

t3lib_ajax:: (4 méthodes):
  getJScode()
  ajax_initObject()
  ajax_doRequest()
  outputXMLreply()


Classe: t3lib_ajax  - X-Ref

TYPO3 XMLHTTP class (new in TYPO3 4.0.0)
This class contains two main parts:
(1) generation of JavaScript code which creates an XMLHTTP object in a cross-browser manner
(2) generation of XML data as a reply

getJScode($handlerFunction, $fallback='', $debug=0)   X-Ref
Gets the JavaScript code needed to handle an XMLHTTP request in the frontend.
All JS functions have to call ajax_doRequest(url) to make a request to the server.
USE:
See examples of using this function in template.php -> getContextMenuCode and alt_clickmenu.php -> printContent

param: string        JS function handling the XML data from the server. That function gets the returned XML data as parameter.
param: string        JS fallback function which is called with the URL of the request in case ajax is not available.
param: boolean        If set to 1, the returned XML data is outputted as text in an alert window - useful for debugging, PHP errors are shown there, ...
return: string        JavaScript code needed to make and handle an XMLHTTP request

ajax_initObject()   X-Ref
Pas de description

ajax_doRequest(url)   X-Ref
Pas de description

outputXMLreply($innerXML)   X-Ref
Function outputting XML data for TYPO3 ajax. The function directly outputs headers and content to the browser.

param: string        $innerXML    XML data which will be sent to the browser
return: void



Généré le : Sun Nov 25 17:13:16 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics