<?php echo $ajax->link('Ajax', '/contact/',
array('update'=>'changediv', 'indicator'=>'loaddiv',
'loading'=>"showById('loading'); hideById('changediv');",
'complete'=>"slidedown....
I believe that's how you do it. I can't remember if you need to add
the "function() { " to it, but I don't have enough time to test it
out. Go take a look at the ajax helper in the manual, especially at
the $options keys section.
http://manual.cakephp.org/chapter/helpers
On Aug 8, 6:47 pm, Baz <[EMAIL PROTECTED]> wrote:
> I have a few questions involving ajax.
>
> This is what I have so far:
> <?php echo $ajax->link('Ajax', '/contact/', array('update' => 'changediv',
> 'indicator' => 'loaddiv')); ?>
>
> My problem is that it uses Element.show. I've seen a slide used on a CakePHP
> site before. The output was something like this:
>
> new Ajax.Updater('changediv','/contact/', {asynchronous:true,
> evalScripts:true, onLoading:function(request) { showById('loading');
> hideById('changediv');}, onComplete:function(request)
> {slideDown('changediv'); hideById('loading');}, requestHeaders:['X-Update',
> 'changediv']}) }, false);
>
> So my question is. How did they implement the "slideDown/showById, hideById,
> etc.? At first I thought maybe it was done manually, but after closer
> scrutiny I realized it was Cake.
>
> Any ideas?
> ThanX in advance.
> --
> Baz L
> Day In The Life of Bazhttp://www.LifeOfBaz.com
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---