Use $ajax->observeField method of ajax helper. Here is an example: <span id="albumNameMsg"></span> <?php echo $ajax->observeField("AlbumNametext",array ('url'=>'checkAlbumName','update'=>'albumNameMsg','loading'=>"Element.show ('loaderIDCheck')",'loaded'=>"Element.hide ('loaderIDCheck')",'before'=> "if($('AlbumNametext').value == ''){ $('albumNameMsg').innerHTML='Please enter album name'; $('albumNameMsg').style.color='red'; return false; } else { $('albumNameMsg').innerHTML=''; }")); ?>
On Apr 14, 6:19 pm, "Dr.Dran" <franco.tampi...@gmail.com> wrote: > Hi! > > I'm a newbe, I try to make my new application with cake, there is a > simple shopping cart. > > I have in particular two field that one is the quantoty and one is the > price. > > My problem is that I want when i fill the quantity field the price > field change his value that was a simple product of the price for the > quantity... > > I found in ajax inhttp://ajaxtags.sourceforge.netth function Update > Field that seems do what I need: "Updates one or more form field > values based on response to text entered in another field" > > There is the same thing in cake ajaxhelper? There is some examples? > > Best regards > > Franco Tampieri > > P.S. Excuse me for my bad english :P --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---