You'll probably get more helpful responses if you explain what you're
trying to do in English, rather than in code, particularly a code, the
understanding of which, is predicated on the knowledge of a syntax and
methodology which is not part of the Cake universe.

Also: Cake 1.1 or 1.2?   Though the CakePHP documentation is not on
the same level as Rails documentation, there is a manual which
explains quite a lot.  The manual is at http://manual.cakephp.org for
Cake 1.1, and http://tempdocs.cakephp.org/#TOC12047 for Cake 1.2.

Here's the gist of Ajax in Cake.

1.  Ajax updating of web pages is handled by the integration of the
Prototype.js and Scriptaculous.js libraries.
2. Integration of the libraries if achieved by use of the AjaxHelper,
and the inclusion of the RequestHandler component.  Read the manual to
learn how to include Helpers and Components in your code.
3. I don't know Rails, but I know ruby, so I am taking a stab at your
question in particular.
a. It sounds like the method you want is AjaxHelper::Link (make sure
to  the js files in your layout or view).
b. (Learn bout AjaxHelper at http://api.cakephp.org/1.2/class_ajax_helper.html
<- This is the API.  You have to learn to love it.)
c. You call this method in the view with $ajax->link.

Hope this helps

On Feb 29, 9:49 am, MarcS <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I'm pretty new to cake. I previously used rails for my project but due
> to the requirements of my current project php will have to be used and
> I therefore opted to use Cake.
>
> I was not able to find very good information about how to get Ajax to
> work the way I want to.
> In rails I could have something like this in my controller
>
> render :update do |page|
>        page.remove "dom_element"
>        page.insert_html :after, 'some_element', :partial =>
> 'line_item', :object => @variable_for_partial_rendering
> end
>
> Is there an easy way that I can do this kind of Javascript responses
> in Cake?
>
> thanks,
>
> Marc

--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to