$ajax->linkToRemote() is deprecated

A lot of people still use $ajax->linkToRemote(), but this function is deprecated. That means you should not use this function anymore. Instead use the new function $ajx->link(). A simple example:

$ajax->link('My link', 'controller/action', array('update' => 'id_of_div'));


  1. Posted January 24, 2006 at 8:03 pm | Permalink

    there is a problem with the link function if your array(‘url’) is different then your url. see https://trac.cakephp.org/ticket/313 for ticket and https://trac.cakephp.org/changeset/1857 for the patch that will be in trunk soon

  2. Nate
    Posted January 25, 2006 at 7:15 pm | Permalink

    In the meantime, you can also use this:

    It allows you to use the same URL for both Ajax requests and normal requests.

    Also, the reason linkToRemote was deprecated was so that Ajax linking was more consistent with plain HTML linking.

    With $ajax->link, the parameters are the same as $html->link. This not only improves consistency, but also makes it easy to convert sections of your application to using Ajax.

Post a Comment

Required fields are marked *

%d bloggers like this: