If you just need to show / hide content you can do something like this:
<?php
echo $html->link('Show/Hide','#',array('id' => 'togglelink'));
echo
$javascript->event('togglelink','$(\'toggle_content\').toggle();
Event.stop(event);');
?>
<div id="toggle_content" style="display: none">
<p>Quisque volutpat arcu et dolor? Vestibulum eu odio id neque
laoreet tempus.</p>
</div>
Nancy wrote:
> Hi Miles!
>
> I did look at $ajax->link, fooled around with it for what seemed like
> hours, and couldn't figure out how to have it just show/hide the div
> without specifying a url or link to some controller function/view.
>
> An example would be great if you've got the code in your fingertips.
>
> On Jan 18, 3:41 pm, Miles J <[email protected]> wrote:
>
>> You dont have to use $html->link. Just write the anchor element
>> manually.
>>
>> $html->link is usually used for internal linkings and routing.
>>
>> BUT you may take a look at $ajax->link.
>>
> >
>
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---