Monday, January 24, 2011

Re: Need Ajax Help

I'm not seeing anything in your code that would produce a confirmation
request. Your delete link in your view is

echo $html->link('Delete',array('action'=>'delete',
$user['User']['id']),array('class'=>'confirm_delete'));

Are you attaching JS code to the click event of DOM objects with the
'confirm_delete' class?

You might want to try just using the fourth parameter to the $html-
>link() function, which is a confirmMessage (see the examples in the
Cookbook on http://book.cakephp.org/view/1442/link). Essentially,
when you use this fourth parameter, the HtmlHelper generates the JS
code to display a dialog box with your confirmMessage, and the buttons
"Cancel", and "OK", and attaches it to the onClick of the link.

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate