francky06l wrote:
> You can combine the redirect in same view as for the failing, or make
> 2 views. Your controller can use $this->render('success') or $this-
>   
>> render('failure') OR
>>     
> $this->set('failure', 1) and use a condition in the view.
>
> I try to be more precise with a sample (I am not good at this) :
>
> In you login view :
>
> ...
> ...
> <?php echo $ajax->submit(... .. ... array('update' => 'mydiv')); ?>
> <div id ="mydiv"></div>
>
> In your view or 2 views you will update the same div, difference
> being :
>
> 1) on failure, you will probably "fill up" your div with message, html
> etc...
>
>     <?php $ajax->div("mydiv"); ?>
>     <p>Error</p>
>     .....
>     <?php $ajax->divEnd('mydiv'); ?>
>
>
> 2) on success, you will write smething like :
>     <?php $ajax->div("mydiv");
>         $js = "window.location.href='".FULL_BASE_URL.$this->html-
>   
>> url('/Controller/action')."'";
>>     
>         echo $javascript->codeBlock($js);
>         $ajax->divEnd("Mydiv");
>      ?>
>
>   
awesome
thank you

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