In Cake 2 I am using the following code in a add.ctp view file:
<?php echo $ajax->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:
<?php echo $this->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\xxxxxx\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
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to