Zum Inhalt springen

Mootools vs xAJAX vs Json

Erstellt am 6. Oktober 2009 · 3 Antworten · letzte Antwort am 7. Oktober 2009

Tags: PHP, JavaScript & AJAX, Frage

digitalfreak ·

Hallo alle zusammen,

ich habe da mal eine Frage.

Bei xAjax ist die Einbindung ja ein Kinderspiel.

JS Funktion registrieren und gleichnamige PHP Funktion erstellen und mit xml zurück geben. Fertig.

Wie funktioniert das genau bei Mootools?

Ich habe nur aus der Doku das hier:

// checks if t3mootools is loaded
if (t3lib_extMgm::isLoaded('t3mootools'))    {
   require_once(t3lib_extMgm::extPath('t3mootools').'class.tx_t3mootools.php');
} 	 
// if t3mootools is loaded and the custom Library had been created
if (defined('T3MOOTOOLS')) {
 	tx_t3mootools::addMooJS();
// if none of the previous is true, you need to include your own library
// just as an example in this way
} else {
	$GLOBALS['TSFE']->additionalHeaderData['rgsmoothgallery'] =   '<script src="'.$this->getPath($this->conf['pathToMootools']).'" type="text/javascript"></script>';
}

Aber das ist ja nur die Einbindung vom standard JS von Mootools.

Wie bekomm ich meine Funktionen so wie bei xAjax da rein?! Geht das überhaupt so bequem?

Wenn mt das nicht kann, kann das vielleicht Json so wie xAjax?

just2b ·

Hallo,

nein so bequem gehts da nicht! schau dir zB rgtabs an, am einfachsten über einen alternativen page-type, den du wieder über die extension füllst

georg

digitalfreak ·

Mist ^^ ... hab ichs mir fast gedacht.

Über eID würde da sicherlich auch irgendwas gehen oder? Ist mir grad so in den sinn gekommen.

Das heißt:

eID=ext

class ext {
function xyz () { return bla }
}

Und durch die eID wird ja nichts gerendert. Das heisst das müsste dann wohl so aussehen:

<form action="bla.html?eID=ext" ...>

Sowas in der art...?!