I am using "Ajax->form" from CakePHP, and now i need create a simple validation, i tried use "before" and "create", but without success. I saw this topic:
http://groups.google.com.br/group/prototype-scriptaculous/browse_thread/thread/43a1ff2fbc9e968f/6036631fa2d741e2?lnk=gst&q=stop+ajax#6036631fa2d741e2 But, I can not understand In php: /////////////////////////////////////////////////////////////////////////////////////////// echo $ajax->form('adicionar','post', array('model'=>'Cargo' , 'update'=>'ajax-mensagem' //Elemento que recebe o conteúdo impresso pela url , 'complete'=> "Effect.Pulsate('ajax-mensagem');" , 'id' => 'form-inclusao' )); /////////////////////////////////////////////////////////////////////////////////////////// The Cake Generate this: /////////////////////////////////////////////////////////////////////////////////////////// Event.observe('form-inclusao', 'submit', function(event) { new Ajax.Updater('ajax-mensagem','/apps/global/cargos/adicionar', {asynchronous:true, evalScripts:true, onComplete:function(request, json) {Effect.Pulsate('ajax-mensagem');}, parameters:Form.serialize('form-inclusao'), requestHeaders:['X-Update', 'ajax-mensagem']}) }, false); /////////////////////////////////////////////////////////////////////////////////////////// Thanks, Celso. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" 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/prototype-scriptaculous?hl=en -~----------~----~----~----~------~----~------~--~---
