Zum Inhalt springen

xaJax Problem

Erstellt am 22. Mai 2008 · 1 Antwort · letzte Antwort am 22. Mai 2008

Tags: Frage

king_pagel ·

Hallo,
ich habe ein Formular mit verschiedenen Radio-Buttons (siehe Code). XaJax reagiert aber nur, wenn ich einen Radio-Button zweimal auswähle.

Beispiel:
Ich wähle zuerst radio1 aus -> nichts passiert
Ich wähle radio1 aus -> Value von radio1 wird ausgegeben
Ich wähle radio2 aus -> Value von radio1 wird ausgegeben
...

[...]
$this->xajax = t3lib_div::makeInstance('tx_xajax');
$this->xajax->registerFunction(array('tx_commercelisting_formData',&$this,'formData'));
$this->xajax->processRequests();
$GLOBALS['TSFE']->additionalHeaderData[$this->prefixId] = $this->xajax->getJavascript(t3lib_extMgm::siteRelPath('xajax'));
[...]
function formData($arg){
// Debug the content of the "submitted" Form
$xajax_content = t3lib_div::view_array($arg);
// Instantiate the tx_xajax_response object
$objResponse = new tx_xajax_response();
$objResponse->addAssign('ergebnis', 'innerHTML', $xajax_content);
//return the XML response generated by the tx_xajax_response object
return $objResponse->getXML();
}
<form name="tx_commercelisting_content_left_form" method="post" id="tx_commercelisting_content_left_form">
<input type="radio" name="radio" value="radio1" id="radio1" onchange="xajax_tx_commercelisting_formData(xajax.getFormValues('tx_commercelisting_content_left_form'))" />
<input type="radio" name="radio" value="radio2" id="radio2" onchange="xajax_tx_commercelisting_formData(xajax.getFormValues('tx_commercelisting_content_left_form'))" />
<input type="radio" name="radio" value="radio3" id="radio3" onchange="xajax_tx_commercelisting_formData(xajax.getFormValues('tx_commercelisting_content_left_form'))" />
</form>
[...]
<div id="ergebnis"></div>

Hat jemand von euch eine Idee, wo mein Fehler ist?

king_pagel ·

Hallo,
mitlerweile hat sich herausgestellt, dass der beschriebene Fehler nur im IE vorkommt. Es gibt jedoch eine Fehlermeldung, die im Firefox angezeigt wird, mit der ich nichts anfangen kann.

Fehlermeldung:
Error: the XML response that was returned from the server is invalid.
Received:
<table border="1" [...]

Kann damit jemand von euch etwas anfangen?
Vielen Dank für eure Hilfe im Voraus! 🙂