23483 Posts in 18976 Topics by 2878 members
|Go to End|
14 July 2010 at 3:57am
I'm building a site where I'm showing a selection of DataObjects on a page, using the default DataObjectSet Pagination. This works fine, but now I want to use Ajax to load the next batch of objects into a wrapper div, without having to reload the entire page.
What I'm doing is have a jQuery click event load the pagination link into the wrapper div, adding an extra urlsegment, athat calls my Page's AjaxPagination() action. So:
myURL/?start=9&... becomes /myURL/AjaxPagination/?start=9&...
Has anyone done this before or have ave any ideas on this? It would be much appreciated...
14 July 2010 at 9:56pm
The module is here http://code.google.com/p/silverstripe-podcast-module/source/browse/trunk
Let me know if that answers your question
15 July 2010 at 11:10pm
I (stupidly ) never even checked if Director::is_ajax() would work, since it said either use prototype or add some ajax header manually. I was convinced 'it' couldn't know about me doing some jQuery load... Still feels like some sort of magic that it does actually see me doing it.
Thanks Howard, for pointing me in the right direction
|Go to Top|