Saturday, May 30, 2009

Re: Routes and AJAX

On Sat, May 30, 2009 at 12:16 AM, Dave Maharaj :: WidePixels.com
<dave@widepixels.com> wrote:
> Do you have to do anything special when you have custom routes and calling
> an Ajax function?
>
> Trying to do something simple and no luck.....update a div
>
> my routes take users/journals to /journals simply removing the "users" in
> the url....
>
> Now on journals i want to load a entry (element) into a div and all i get is
> users/journal/entry not found.

What do both the route and href look like?


> I have other ajax div updates on pages where there are no route changes and
> it works fine....
>
> Checked:
> render the entry.ctp in the elements folder
>
> Tried url in the html link helper using users/journals  and journals

Can you post the code using HtmlHelper::link()?

> Tried leaving controller action as # in the link and use
> $("#page_load").load( id + '/entry' , {

Why do you have the ID before '/entry'?


> What am I missing? The  div fades out where the new one should load...then
> users/journal/entry not found.

Have you checked your logs? It may be that there's an error that your
debug setting is hiding from you.

--~--~---------~--~----~------------~-------~--~----~
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+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

No comments: