Hi John,

Thanks for helping.

I actually made a mistake when pasting the code. The original trial
was

<?php echo $ajax->submit(__('send', true), array('url'=> array
('controller'=>'users', 'action'=> 'recoverPassword'), 'class'=>
'button', 'update' => 'messages')); ?>

and the same happens, basically nothing nothing at all when I click on
the Send button.

Don't know if it helps but here is the corresponding generated HTML
code :

<div class="submit"><input type="submit" url="" class="button"
value="Send" id="submit116667344" onclick="event.returnValue = false;
return false;" /></div><script type="text/javascript">
//<![CDATA[
Event.observe("submit116667344", 'click', function(event) { new
Ajax.Updater('messages','/MyApp/html/users/recoverPassword',
{asynchronous:true, evalScripts:true, parameters:Form.serialize
(Event.element(event).form), requestHeaders:['X-Update',
'messages']}) }, false);
//]]>
</script>
</form>
</div>

Thanks,

On Dec 9, 6:42 pm, John Andersen <j.andersen...@gmail.com> wrote:
> I do observe that your ajax->submit is supposed to call your "login"
> action in your "users" controller and not your "recoverPassword"
> action!
> Please check your code or your statement :)
> Enjoy,
>    John
>
> On Dec 9, 3:03 pm, thomaus <tho...@saimiris.com> wrote:
>
> > Hi there,
>
> > I just built an AJAX form and it doesn't work at all!
>
> > My code:
>
> > <div id="messages" style="display: none">
> > <h3>Recover lost password</h3>
> > <p>Enter your e-mail address and we will send a reset link to your
> > email
> > <?php echo $form->create('User'); ?>
> >                         <?php echo $form->input('email', array('label' => 
> > __('Your
> > Email', true), 'class' => 'text-input')); ?>
> >                         <div class="clear"><br /></div>
>
> >                         <?php echo $ajax->submit(__('Send', true),
> >                                                                             
> >     array('url'=> array('controller'=>'users', 'action'=>
> > 'login'),
> >                                                                             
> >     'class'=> 'button',
> >                                                                             
> >     'update' => 'messages')); ?>
>
> > <?php echo $form->end(); ?>
> > </div> <!-- End #messages -->
>
> > The button appears and when I click on it, absolutely nothing happens
> > while if I type myapp/users/recoverPassword in my browser it of course
> > calls my controller correctly.
>
> > Thanks in advance,
>
> > thomas...

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 cake-php@googlegroups.com
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?hl=en

Reply via email to