Hmmm
Now, flash text message shows in flashmessage div, but for flash
message link working I needed change flash layout to:

<div>
<p><strong><? echo $ajax->link($message, $url,
array('update'=>'content-center'))?></strong></p>
</div>

The change is made for ajax behavior of flash message link.

And another question.
In standard actions (bake generated) eg. in delete method there is
setFlash and redirect methods in errors handling

        function delete($id = null) {
                if(!$id) {
                        $this->Session->setFlash('Invalid id for Client');
                        $this->redirect('/clients/index');
...

If I use AJAX requests (/controller/delete as $ajax->link) with update
option this redirects generate all page content (with html, head,
body... tags - view with layout code) and put it to update div. It
shouldn't wok like this of course. Is a good way to run this redirects
in AJAX mode (generate and returns only view code, based on AJAX
layout).

Now I have
$this->flush(...);
 exit();



On 27 Sty, 06:29, "rombeh" <[EMAIL PROTECTED]> wrote:
> <div id="content">
> <div id="flashmessage">flash message stuff here..</div>
>
> </div>
>
> just add "insertion"=>"Insertion.bottom" to you ajaxupdate callback, so
> response data will be placed under #flashmessage div
>
> On Jan 27, 7:52 am, "Jacek" <[EMAIL PROTECTED]> wrote:
>
> > Hi all.
> > I'm working onajax-powered application and I have problem with flash
> > messages. Almost all actions in the application works withajax. I have
> > div with id=content. Every html code is loaded to this div byajax
> > links with "update"=>"content" option.
>
> > The problem is how to embed flash messages into the div#content (this
> > is main content div in default layout)? I tried to make flash layout
> > likeajax.thtml (with only content_for_layout variable), but it is not
> > working off course.
>
> > If it possible another question is how to redirect to anajaxaction
> > after flash message timeout?


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