Hi ..
The problem is easy to diagnose, but I don't know how to solve it.
This code:
return $this->Ajax->link(
$title,
$url,
array(
"update" => $AjaxDivUpdate
),
NULL,
NULL,
FALSE
);
generates the links.
Any link returned as part of an ajax update seems to be url encoded.
This one will work
<a href="/pagination/ajaxed/?direction=DESC" id="link29970050"
onclick=" return false;">id</a><script
type="text/javascript">Event.observe('link29970050', 'click',
function(event){ new
Ajax.Updater('content','/pagination/ajaxed/?direction=DESC',
{asynchronous:true, evalScripts:true, requestHeaders:['X-Update',
'content']}) }, false);</script>
Because there is only one get parameter, this one will not:
<a href="/pagination/ajaxed/?sortBy=name&sortByClass=Category"
id="link1348214211" onclick=" return false;">Sort by Category
Name</a><script type="text/javascript">Event.observe('link1348214211',
'click', function(event){ new
Ajax.Updater('content','/pagination/ajaxed/?sortBy=name&sortByClass=Category',
{asynchronous:true, evalScripts:true, requestHeaders:['X-Update',
'content']}) }, false);</script>
Because there are 2 get parameters and the & is being url encoded
It should be "?sortBy=name&sortByClass=Category" to work.
What needs to be done to generate the links correctly? I hope someone
more ajax savvy can show the way...
Cheers,
AD7six
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---