When i use redirect from an ajax request the ajax.ctp is not rendered. I try calling setFlash with growl layout but doesn't work.
I have a content div in my webpage. When i submit the form i save the data, then set a Flash message and redirect to the index. The index is loaded in the content div, but the message is not shown. If i put some debug comments like echo "debugging" on the ajax.ctp layout theses comments are not printed. So i suspect that the view is not rendering the layout properly. any idea ? On Oct 13, 10:18 pm, "Andras Kende" <[EMAIL PROTECTED]> wrote: > this worked great for > me:http://blog.jaysalvat.com/articles/afficher-vos-messages-flash-cakeph... > delegantes-alertes-a-la-growl.php > > did it for both flash and validation.. > > Andras > > -----Original Message----- > From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf > > Of Julián Lastiri > Sent: Monday, October 13, 2008 2:11 PM > To: CakePHP > Subject:AjaxRedirectand setFlash Messages > > I'm using cakephp 1.2RC3 > I want to show messages with setFlash method but when i useredirect > theajax.ctp layout is not rendered. > I'm using this code to show messages with jGrowl inside myajax.ctp > layout > > <?php if ($session->check('Message.flash')): ?> > <script> > jQuery(document).ready(function(){ > jQuery.jGrowl( "<?php echo $session- > >read('Message.flash.message');?>", { > life: 2000, > sticky: false, > header: '<?php echo $header;?>', > theme: '<?php echo $message_class;?>' > }); > }); > </script> > > any idea ? > > thanks ! --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---