Hi,
I must clarify that I did several tutorials.
I tried with the Cakebaker tutorial :
http://cakebaker.42dh.com/2006/01/18/submit-a-form-with-ajax/
I looked at the API but I don't understand what's going on.
If someone has an idea...
Pierre MARCOURT a écrit :
> Hi,
>
> I have a problem when I try to submit a form by using Ajax.
> If I submit this form by using html, it works well.
> Since I changed the code and try to do it with Ajax, FireBug give this
> error :
>
> $(form) has no properties
> return $A($(form).getElementsByTagName('*')).inject([], in
> prototype.js (line 1222)
>
> It would be great if someone could help me.
> Here is my view :
>
> <?php $ajax->form('/users/ajaxchangepwd', 'post', array('update' =>
> 'ajax')); ?>
> <div id="ajax">
> <?php echo $form->labelTag('User/oldpass', 'Old password');?>
> <?php echo $html->passwordTag('User/oldpass'); ?>
>
> <?php echo $form->labelTag('User/newpass', 'New password');?></b></td>
> <?php echo $html->passwordTag('User/newpass'); ?>
>
> <?php echo $form->labelTag('User/newpassagain', 'Repeat new password');?>
> <?php echo $html->passwordTag('User/newpassagain'); ?>
>
> <?php echo $ajax->submit(); ?>
> </div>
> </form>
>
> Thanks.
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---