Posts

Showing posts from January, 2018

URL Storing

plane.blade.php ________________ if (isset($exception)){             $message = $exception->getMessage();         }else{             $message='Ok';         }         ?>         <script type="text/javascript">             var ip_address = '<?php echo $_SERVER['REMOTE_ADDR'];?>';             var user_id = '<?php echo $user_id;?>';             var message = '<?php echo $message;?>';             var project_name = "MoCAT."+"<?php echo env('SERVER_TYPE', 'unknown');?>";             var token = '{{ csrf_token() }}';         </script>         <script src="{{ asset("assets/scripts/url-webservice.js") }}">...

Upload file with uploading progress

index.php <script type="text/javascript">     function _(el){         return document.getElementById(el);     }     function uploadFile(){         var file = _("file1").files[0];         var formdata = new FormData();         formdata.append("file1",file);         var ajax = new XMLHttpRequest();         ajax.upload.addEventListener("progress",progressHandler,false);         ajax.addEventListener("load",completeHandler,false);         ajax.addEventListener("error",errorHandler,false);         ajax.addEventListener("abort",abortHandler,false);         ajax.open("POST","server_page.php");         ajax.send(formdata);     }     function progressHandlere(vent){         _("load...