Re: reset form input after submission with jQuery and unique ID
I have moved topic to new post,... can anyone help please,... https://groups.google.com/forum/?fromgroups=#!topic/cake-php/amKeMnVR_dI On Tuesday, February 26, 2013 8:45:43 PM UTC-8, Chris wrote: > > hi guys,... can anyone help please,... > how can I reset form after submission with unique ID, with jquery? Where > unique ID is $photo_comment['PhotoComment']['id'] > > this is what I have so far,... and how do I > code $photo_comment['PhotoComment']['id'] when complete: > , 'complete' => 'javascript:resetReportPhotoCommentForm();' > > > submit('Report', array('url'=> > array('controller'=>'photo_comments', 'action'=>'report_spam/'. > $photo_comment['PhotoComment']['id']), 'update' => > "updateReportPhotoComment_".$photo_comment['PhotoComment']['id'], > 'complete' => 'javascript:resetReportPhotoCommentForm();')); ?> > end(); ?> > > > > function resetReportPhotoCommentForm() > { > document.getElementById("ReportCommentFormId").reset(); > } > > > thanks in advance > chris > > -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: reset form input after submission with jQuery and unique ID
anyone...? On Tuesday, February 26, 2013 8:45:43 PM UTC-8, Chris wrote: > > hi guys,... can anyone help please,... > how can I reset form after submission with unique ID, with jquery? Where > unique ID is $photo_comment['PhotoComment']['id'] > > this is what I have so far,... and how do I > code $photo_comment['PhotoComment']['id'] when complete: > , 'complete' => 'javascript:resetReportPhotoCommentForm();' > > > submit('Report', array('url'=> > array('controller'=>'photo_comments', 'action'=>'report_spam/'. > $photo_comment['PhotoComment']['id']), 'update' => > "updateReportPhotoComment_".$photo_comment['PhotoComment']['id'], > 'complete' => 'javascript:resetReportPhotoCommentForm();')); ?> > end(); ?> > > > > function resetReportPhotoCommentForm() > { > document.getElementById("ReportCommentFormId").reset(); > } > > > thanks in advance > chris > > -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
reset form input after submission with jQuery and unique ID
hi guys,... can anyone help please,... how can I reset form after submission with unique ID, with jquery? Where unique ID is $photo_comment['PhotoComment']['id'] this is what I have so far,... and how do I code $photo_comment['PhotoComment']['id'] when complete: , 'complete' => 'javascript:resetReportPhotoCommentForm();' submit('Report', array('url'=> array('controller'=>'photo_comments', 'action'=>'report_spam/'. $photo_comment['PhotoComment']['id']), 'update' => "updateReportPhotoComment_".$photo_comment['PhotoComment']['id'], 'complete' => 'javascript:resetReportPhotoCommentForm();')); ?> end(); ?> function resetReportPhotoCommentForm() { document.getElementById("ReportCommentFormId").reset(); } thanks in advance chris -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en. For more options, visit https://groups.google.com/groups/opt_out.