Back

ajax.js Call Sample Scripts

Copy Below Code View As A Text File Show Text Only Show API Edit Code
                            

// Path ::: https://api.fastcodings.com/js/ajax.js //https://www.gen.123web-designs.com/gen_code/528 <a href="javascript:;" onClick="quick_popup('heading','This is test comment. Please ignore this.');" class="btn btn-info">Load Popup</a> <a href="javascript:;" onClick="quick_popup_get('Heading Title','{{base_url()}}getUrl');" class="btn btn-info">Get Popup Get Metho</a> quick_ajax_post(postURL, dataObj, cbfunc, FuncParamArr) quick_ajax_get(getURL, dataObj, cbfunc, FuncParamArr) quick_ajax_delete(pageURL, id) quick_edit(pageText, getURL, postURL) quick_popup(headingText, content) quick_popup_get(pageText, getURL) quick_submit(postURL, dataObj) //-------Quick Form submit default form Name : actionForm /////////////////////////// CALL quick_ajax_post( '{{route('admin.user.update_sts')}}', {sts:sts,idd:idd, _token:$("meta[name=csrf-token]").attr("content")}, function(FuncParamArr){ //obj.errormsg or which is getting from ajax can be used here. //console.log(FuncParamArr[1]); alertme('<i class="fa fa-check" aria-hidden="true"></i> Updated Successfully ','success',true,1500); }, [2,44] ); //////////////////////////// PHP /////////////////////////////// //https://www.gen.123web-designs.com/gen_code/452 echo ajax_response(true,'');exit; echo ajax_response(false,'ERROR found.');exit;