I'm not terribly strong on Ajax or Javascript, so this might be
obvious to some of you.

I have a view with a form that, when submitted, triggers a find and
returns some search results to the same view. The search criteria is
shown in the original search form fields.

The view also contains an element that displays the search results (if
any). The element contains a table that is using ajax pagination (I'm
using Cake version 1.3 with the new JSHelper and JQuery).

My first problem is: the ajax is triggering OK, but it is going back
to the same controller function that fires the search. As there is no
form data, the search triggers again but - with no form data and
therefore no search criteria - it returns an empty array (i.e. no
search results). Therefore the pagination is empty. How do I prevent
this happening? I just want to get the same results back either sorted
or on a different page.

My second problem is: when I click a pagination link [firstly I get
problem 1 above!] the div that holds the element now contains all of
the page code (headers and everything). All I want is the bare
contents of the element. How do I achieve this please?

As an added bonus, I'd like the search criteria form to be Ajax as
well, so that it just refreshes my results element.

Thanks.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to