Hi,
I am having trouble with reloading just a DIV, after deleting
information in it. here is the view that is called everytime a user
uploads an attachment. it shows all uploaded files by looping through
the table:
render_attachment.ctp
<?php
echo
$javascript->link('scriptaculous-js-1.8.3/lib/prototype');
echo
$javascript->link('scriptaculous-js-1.8.3/src/
scriptaculous');
foreach ($attachments as $attachment):
$options = array(
'url' => array(
'controller' => 'links',
'view' =>
'deleteattachment',
$attachment['LinkTmp']['name']
),
'update' =>
'attachments_div'
);
?>
<?php
echo $attachment['LinkTmp']['name'];?>
echo $html->image("../img/icons/close.png", array(
"alt" => "delete",
'url' => array('action' => 'deleteattachment',
$attachment['LinkTmp']['name'])
));
behind each file i put a link to delete it. that works perfectly. i
just have probs with loading this exact DIV new to show the rest of
the uploaded files..
i tried to solve it with cakes ajax helper:
$options = array(
'url' => array(
'controller' => 'links',
'view' =>
'deleteattachment',
$attachment['LinkTmp']['name']
),
'update' =>
'attachments_div'
);
echo $ajax->link('delete', '/links/deleteattachment/' .
$attachment['LinkTmp']['name'], $options);
echo $ajax->div('attachments_div');
but then a new page opens and show the uploaded files....i need
guidance here :)
if you have an idea, do you mind giving me a hint with code?
i appreciate it...
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