Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

file upload with progress bar

<script src="js/code_js.js" type="text/javascript"></script> <script src="js/code_js1.js" type="text/javascript"></script> <script type="text/javascript">$(document).ready(function() { 	 $('#upload_container').submit(function(e) {			if($('#userImage').val()) {			e.preventDefault();			$('#loader-icon').show();			$(this).ajaxSubmit({ 				target:   '#targetLayer', 				beforeSubmit: function() {				  $("#progress-bar").width('0%');				},				uploadProgress: function (event, position, total, percentComplete){						$("#progress-bar").width(percentComplete + '%');					$("#progress-bar").html('<div id="progress-status">' + percentComplete +' %</div>')				},				success:function (){					$('#loader-icon').hide();				},				resetForm: true 			}); 			return false; 		}	});}); </script>
Comment

file upload with progress bar

<center><form id="upload_container" action="upload.php" method="post"><div><label>Upload Image File:</label><input name="userImage" id="userImage" type="file" class="demoInputBox" /></div><br /><div><input type="submit" id="btnSubmit" value="Submit" class="btnSubmit" /></div><div id="progress-div"><div id="progress-bar"></div></div><div id="targetLayer"></div></form><div id="loader-icon" style="display:none;"><img src="loading.gif" /></div></center>
Comment

PREVIOUS NEXT
Code Example
Javascript :: sort javascript 
Javascript :: join javascript array 
Javascript :: how to use hash in javascript 
Javascript :: map and set in javascript 
Javascript :: json.stringify file object return {} 
Javascript :: componentDidmount event on fonctional component 
Javascript :: copy an array 
Javascript :: post nodejs 
Javascript :: how to generate angular component with scss 
Javascript :: search in array javascript 
Javascript :: launch json 
Javascript :: static in javascript 
Javascript :: angular js 
Javascript :: how to write last element of array 
Javascript :: onmousedown 
Javascript :: slice() javascript 
Javascript :: working with multiple db in single query mongodb 
Javascript :: what is palindrome 
Javascript :: append css file with javascript 
Javascript :: javascript find textarea 
Javascript :: screenshot 
Javascript :: react in jquery 
Javascript :: what the cjs.js fiel use 
Javascript :: identifier in js 
Javascript :: js.l17 
Javascript :: moment_timezone_1.default(...).tz(...).format is not a function 
Javascript :: action cable nuxtjs 
Javascript :: javascript cargar un html 
Javascript :: example of a traditional NetSuite search 
Javascript :: two dimensional array object in javascript 
ADD CONTENT
Topic
Content
Source link
Name
3+9 =