Hi,

I have this working:
<?php echo $ajax->link('Home','/',array('update'=>'content')); ?>
It worked in replacing the contents of <div id="content">.

But I want to hide another div (<div id='sidebar'>) while doing that.
Looking through the docs, I surmised that I can attach the function in the
callback.  But how do I do that?

Trying to see how it works, I tried to modify the example code slightly:
<?php echo
$ajax->link('Home','/',array('update'=>'content'),array('complete'=>'alert("hello")');
?>

but the result is that I get a blank dialog window right after clicking the
"Home" link, with an "Ok" button and a "Cancel" button.  There was no
"hello" text.  Pressing the Ok button proceeded to load my home content into
the "content" div.  Is this more like a confirmation?  I know I typed
"complete" and not "confirm".

Or is this the wrong way to make that div disappear?  (is there an easier
way?)  Can someone enlighten me?

Regards,
Iqbal S.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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

Reply via email to