Re: Problem with ajax code in cake 2
The link takes the same parameters as the HtmlHelper::link() method. So, the second parameter is the url it's going to fetch. It will fetch that URL and update it with the selector you defined in the 'update' key in the options parameter. -- 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Problem with ajax code in cake 2
On Jan 14, 4:14 pm, 100rk wrote: > AjaxHelper was removed. > > http://book.cakephp.org/2.0/en/core-libraries/helpers/js.html#JsHelpe... OK, I changed it to: Js->link('Can not read this code? Reload.', 'reload_captcha', array('update'=>'captchaID')); ?> What should reload_captcha be is it a file (what directory should it be in?) or is it something else (an action?) -- 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Problem with ajax code in cake 2
AjaxHelper was removed. http://book.cakephp.org/2.0/en/core-libraries/helpers/js.html#JsHelper::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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Problem with ajax code in cake 2
In Cake 2 I am using the following code in a add.ctp view file: link('Can not read this code? Reload.','regenerate code',array('url'=>'reload_captcha', 'update'=>'captchaID')); ?> ... gives the error: Notice (8): Undefined variable: ajax [APP\View\Users\add.ctp, line 16] I then tried: Ajax->link('Can not read this code? Reload.','regenerate code',array('url'=>'reload_captcha', 'update'=>'captchaID')); ?> ... gives the error: Fatal error: Call to a member function link() on a non-object in C: \xampp\htdocs\xx\View\Users\add.ctp on line 16 Also what should reload_captcha be is it a file (what directory should it be in?) or is it something else (an action?) Thanks. -- 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php