Grokbase Groups PHP cake-php May 2012
FAQ
Hello!

In my app I use ajax pagination. In view of actions ones of my controller i
have code like this:
$this->Paginator->options(array(
'evalScripts' => true,
'data'=> "$('#filters').serialize()",
'update' => '#content',
'before' => " $('#loading').fadeIn('fast');
$('#people').fadeOut('fast'); ",
'complete' => $this->Js->get('#loading')->effect('fadeOut',
array('speed' => 'fast')),

));

and
$this->Paginator->options(array('url' => $this->passedArgs));
...
echo $this->Js->writeBuffer();?


Ajax works fine only to first use, first request looks like this:
http://192.168.1.102/crm/people/by_building/page:2?_method=POST&data%5BApartament%5D%5Bbuilding_id%5D=2021&data%5BApartament%5D%5Bnumber%5D=&data%5BApartament%5D%5Btype%5D=&data%5BApartament%5D%5Brights%5D=&data%5BPerson%5D%5Bsurname%5D=

and this code 'data'=> "$('#filters').serialize()", ajax paginantion works
fine... next click look like:
http://192.168.1.102/crm/people/by_building/page:3

without serialize... but in page code

$("#link-1244917713").bind("click", function (event)
{$.ajax({beforeSend:function (XMLHttpRequest) {
$('#loading').fadeIn('fast'); $('#people').fadeOut('fast'); },
complete:function (XMLHttpRequest, textStatus)
{$("#loading").fadeOut("fast");}, *data:$('#filters').serialize(),*dataType:"html", evalScripts:true, success:function (data, textStatus)
{$("#content").html(data);},
url:"\/crm\/people\/by_building\/page:1\/sort:type\/direction:asc"});
return false;});
$("#link-1907708576").bind("click", function (event)
{$.ajax({beforeSend:function (XMLHttpRequest) {
$('#loading').fadeIn('fast'); $('#people').fadeOut('fast'); },
complete:function (XMLHttpRequest, textStatus)
{$("#loading").fadeOut("fast");}, *data:$('#filters').serialize()*,
dataType:"html", evalScripts:true, success:function (data, textStatus)
{$("#content").html(data);},
url:"\/crm\/people\/by_building\/page:1\/sort:right\/direction:asc"});
return false;});});

Serialize functions exist, but dosen't work and only on Firefox, in Google
Chrome ajax pagination with data works fine.

This problem is a Firefox problem or problem is in my app?

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcake-php @
categoriesphp
postedMay 16, '12 at 1:43p
activeMay 16, '12 at 1:43p
posts1
users1
websitecakephp.org
irc#cakephp

1 user in discussion

Michał Piotrowski: 1 post

People

Translate

site design / logo © 2022 Grokbase