Pop up Javascript alert when PHP code starts to run and alert when finished execution -
i have php controller invokes according javascript click function. want pop javascript alert box when code starts run , alert again after finish execution. how achieve inside php controller
example:
<?php class admin_rentals extends base_admin { function update_user_verification_status() { // should pop alert box // executes code // alert when execution finished } } ?>
you cannot controller. can java script if function executed ajax.something this
alert('execution started'); $.ajax({ url : 'path/to/your/function', type: 'post', success: function(res){ alert('execution completed'); } });
php
class admin_rentals extends base_admin { function update_user_verification_status() { $arrret = array('message'=>'this json'); echo json_encode($arrret); } }
Comments
Post a Comment