[TYPO3-ect] AJAX GET and POST variables
Oliver Hader
oh at inpublica.de
Fri Nov 3 12:50:59 CET 2006
Hi Franz,
Franz Holzinger wrote:
> Chi Hoang a écrit :
>> Franz Holzinger schrieb:
>>> E.g. the L-parameter gets lost and therefore no language translation
>>> is used.
>>
>> <input type="hidden" name="l-parameter" value="1">
>
> IMHO the GET/POST variables can only be transferred as parameters to the
> XAJAX function on the server side. t3lib_div::_GP('L') does not get
> anything here, because the FORM does not get submitted when using XAJAX.
>
> E.g. in tt_products we have:
>
> function showArticle($data) {
> // We put our incomming data to the regular piVars
> $this->piVars = array_merge($this->piVars, $data[$this->prefixId]);
>
> I could add the L parameter as $data to this function. However it would
> be too late, because there would have been a IF statement in TypoScript
> about L.
Hm, why aren't you calling the server-side script with the "&L" as GET
variable?
For instance:
class some_pi1 {
function main(...) {
$reqURI = 'index.php?'.$somePage.'&L='.t3lib_div::_GP('L');
// or even better, use $this->cObj->typoLink, that should
// integrate the L-parameter, if defined in TS linkVars
$xajax = t3lib_div::makeInstance('tx_xajax');
$xajax->setRequestURI($reqURI);
...
}
}
olly
--
Oliver Hader
http://inpublica.de/
More information about the TYPO3-team-extension-coordination
mailing list