On Sun, Mar 15, 2009 at 12:29 PM, Dave Maharaj :: WidePixels.com <[email protected]> wrote: > I was looking at the modalbox on http://www.wildbit.com/labs/modalbox/ and > found a few tutorials about implementing it in Cake. What I was wondering if > anyone has any information for a situation like this if it is possable to > do. > > On any given page say USERS for example click edit and up opens the modal > box with a form to update say the USERS information....save in the modal > box, can you then call a function to load the newly updated content on the > USERS page. What I currently have without the modalbox is click update on > the USERS page, which AJAX updates a div with them edit form in a div, click > save and it then returns the original view with the newly updated data. > There is a demo here http://modalbox-cakephp-demo.nerdnotes.org/ of the idea > except I do not want the page to reload like it does in the demo. Just > refresh the updated div not the entire page. I sthis possable? >
That should be simple enough, though I use jQuery so can't give you specifics for doing it with Prototype. You'll need to assign a function to the form submit to make it use AJAX, then close the modal window and update the particular table row with the new info on success. Put an ID on each row, eg. "row_user_473" so you can easily replace it. Don't forget to add the ID back to the new row markup, of course. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
