[TYPO3-ect] AJAX GET and POST variables
Franz Holzinger
franz at fholzinger.com
Thu Dec 14 23:03:22 CET 2006
Hello Oliver,
>> var
>> xajaxRequestUri="http://story-castle.net/subname/index.php?id=1395&no_cache=1";
>>
>>
>> The no_cache does not get passed to the server.
>> What's wrong here?
>>
>> It works fine under LINUX and IE6 under Windows (which sadly gives me a
>> XML error).
>
> I guess it's about the "&"... have you tried to use rawurlencode or
> urlencode in PHP to define the $requestURI?
>
When I use rawurlencode, then I get the following result in the
JavaScript file:
var
xajaxRequestUri="http://story-castle.net/metisse/index.php?id=122%26no_cache%3D1";
where no_cache is _not_ transferred to the server
But it is stored in the
error_log ('id = '.t3lib_div::_GP('id'));
id = 107&no_cache=1
urlencode has the same result:
var
xajaxRequestUri="http://story-castle.net/metisse/index.php?id=122%26no_cache%3D1";
But the solution is the function jsspecialchars (see tt_products).
The result is
var
xajaxRequestUri="http://story-castle.net/metisse/index.php?id=122\x26no\x5fcache\x3d1";
And now the no_cache is transferred to the server also with a Internet
Explorer from Microsoft or Firefox under MS Windows.
Thanks for your help.
Greets,
Franz
More information about the TYPO3-team-extension-coordination
mailing list