On Fri, Jan 7, 2011 at 7:32 AM, Zeu5 <[email protected]> wrote:
> Link is the model in this scenario.
>
> In admin_index,
>
> there is a list of Link records.
>
> This whole list is wrapped within a Form. (Let us call this the
> EditListForm)
>
> This EditListForm will post to the admin_edit action of the
> controller.
>
> I also have a Add Link Form directly below the list.
>
> The Add Link Form will create a new Link via Ajax. The Ajax response
> will return the newly created Link in HTML format. The HTML format
> will be treated as a string inside json.
>
> Upon the successful completion, a js function afterAddLink() will be
> called to handle the ajax response.
>
> This afterAddLink() js will append the ajax response into the list.
> using jquery. I used $('endoflist').before($response);

This is probably your problem but without seeing your HTML structure,
I can't say for sure. Use Firebug's "inspect element" pane to watch
the list while you create a new link. Look to see if the new link is
properly included into the edit form.

Instead of posting your ctp, could you do a view source and post just
the list (including the entire form) for one or two links? Also, the
HTML for a single, newly-added link. That would give us a better idea
of the JQuery selector to use when inserting it into the page.

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 [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