You should probably just reset the captcha element then. If you're
reloading the entire /users/add view which of course will kill the data,
seeing as your JS request is just a GET and not a POST.
Try something like this:
*
*
<!-- captcha -->
<div id="captchaID">
<?php echo $this->Html->image($this->Html-
>url(array('controller'=>'users', 'action'=>'captcha'),
true), array('style'=>'','vspace'=>2)); ?>
<?php echo $this->Js->link('Can not read this code?
Reload.', *array('action' => 'captcha')*,
array('update'=>'*#captchaID*')); ?>
<?php echo $this->Form->input('code'); ?>
</div>
<!-- end of captcha -->
*
*
This should make a request to /users/captcha and update the captcha div,
leaving everything else untouched. Also make sure to pass a proper CSS
selector to 'update'.
--
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