CakePHP - How to call JS function when ajax request is completed -



CakePHP - How to call JS function when ajax request is completed -

how can phone call js function when ajax request completed

i'm using js helper , requesthandler component

this view file

<?php echo $this->js->submit('create user', array( 'before'=>$this->js->get('#loading')->effect('fadein'), 'success'=>$this->js->get('#loading')->effect('fadeout'), 'update'=>'#success', )); ?>

i'm getting loading message , success message... want phone call js function when ajax request done/completed, can close user registration div

i solved it...there method in js helper called complete , can phone call js function

<?php echo $this->js->submit('create user', array( 'before'=>$this->js->get('#loading')->effect('fadein'), 'success'=>$this->js->get('#loading')->effect('fadeout'), 'update'=>'#success', 'complete' => 'self.setinterval("test()",2000);' ));

test() called after ajax request completed.

cakephp-2.0

Comments

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -