After a brief discussion on IRC, the answer to that was to use the 'complete' attribute like this;
$ajax->submit('Add', array("condition"=>"checkLogin()", "class"=>"button","url"=>"/projects/$urlname/$pid/comment", "update"=>"project_comment_list", "complete"=>"// clear your text box content here...")) Hope this helps anyone else... Seb. On Apr 7, 5:45 am, "Andres Monroy-Hernandez" <[EMAIL PROTECTED]> wrote: > I have a form with a textarea and a submitbuttongenerated with theAJAXhelper. > When clicking on the submitbuttonI want to send the > request to the server, update the corresponding HTML element *and* > clear the textarea. > > The onClick event is already defined in the helper method as "return > false;", what is the best way to reset the form? > > This is the code that generates the ajaxified submitbutton: > $ajax->submit('Add', array("condition"=>"checkLogin()", > "class"=>"button","url"=>"/projects/$urlname/$pid/comment", > "update"=>"project_comment_list") ) --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---