Thanks Chetan,.... !! it works,....
On Thursday, October 25, 2012 1:13:20 AM UTC-7, chetan varshney wrote:
>
> You can call javascript function on complete
>
>
> <?php echo $ajax->submit('Add', array('url'=> array('controller'=>'photo_
> comments', 'action'=>'ajax_add/'. $photo['Photo']['id'] ), 'update' =>
> 'updateDiv', 'complete' => 'javascript:resetThisForm();')); ?>
>
> <script>
> function resetThisForm()
> {
> document.getElementById("FormId").reset();
> }
> </script>
>
> On Thu, Oct 25, 2012 at 1:15 PM, Chris <[email protected] <javascript:>>wrote:
>
>> hi guys,... is there a way to reset form after ajax submission...? or do
>> I have to go thru jquery submission?
>> here is my form:
>>
>> <?php echo $this->Form->create('PhotoComment'); ?>
>> <?php echo $form->hidden('user_id', array('value' =>
>> $user_object['id'])) ?>
>> <?php echo $this->Form->textarea('content', array('rows' => '3')); ?>
>>
>> <?php echo $ajax->submit('Add', array('url'=>
>> array('controller'=>'photo_comments', 'action'=>'ajax_add/'.
>> $photo['Photo']['id'] ), 'update' => 'updateDiv')); ?>
>>
>> <div class="clr"></div>
>>
>> <div id="updateDiv" style="margin: 10px 0 10px 0;"></div>
>>
>> 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 post to this group, send email to [email protected]<javascript:>
>> .
>> To unsubscribe from this group, send email to
>> [email protected] <javascript:>.
>> Visit this group at http://groups.google.com/group/cake-php?hl=en.
>>
>>
>>
>
>
>
> --
> Chetan Varshney
> Ektanjali Softwares Pvt Ltd
>
>
--
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
Visit this group at http://groups.google.com/group/cake-php?hl=en.