Tuesday, April 24, 2012

Re: Ajax Pagination only works once (no javascript loaded)

Update:

After some questioning in the #cakephp irc channel I've found out or rather was pointed to the fact that I'd need to rebind my javascript functions. I've done so for other divs that are loaded into the current dom, but how would I go about this for my pagination? The links that are created by the PaginatorHelper when using Ajax look like this: 

$("#link-1983047312").bind("click", function (event) {$.ajax({dataType:"html", evalScripts:true, success:function (data, textStatus) {$("#tableWrap").html(data);}, url:"\/companies\/index\/page:1"});
Inside a $(document).ready block at the end of the page. Or rather the links should be bound by live() instead of bind(), is there an easy way to do this or, alternatively, can someone kindly point me to a Ajax Pagination example viable for Cake 2.1? 

Thanks in advance again

Timo

--
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

No comments: