javascript - How to write jQuery-AJAX function to append the list items received from PHP and show the "Loading..." message until he response is recieved? -
i'm having 1 select control on form. want populate select control list values comes php file in form of ajax response. how should , how should show 'loading...' message until response received php file? <label class="col-sm-4 col-sm-offset-1 control-label">select store<span style="color:#ff0000">*</span> :</label> <input type="hidden" name="module_url" id="module_url" value="http://localhost/modules/stores/stores.php"> the necessary php code snippet follows : switch( $op ) { case "get_all_stores": // available stores. $ret_store = $objstore->getallstorebypage(''); if(!$ret) { $error_msg = $objstore->getallerrors(); $data = array(); $data['error_message'] = $error_msg; $data = json_encode($data); echo $data; die; } else { $data = array(); $data = $objst...