GithubHelp home page GithubHelp logo

jquery_ajax_progress's Introduction

image

jQuery AJAX Progress

This is a plugin for making recurring AJAX calls to a server, providing feedback on the process in the response of each call. It is designed for situations where, for example, a large number of PDFs need to be generated on the server, compressed into a zip file, and then downloaded, or when thumbnails need to be generated for many images hosted on the server.

In summary, these processes, on their own, may reach the memory or timeout limit of your server and can be divided into smaller processes.

The plugin adds a Bootstrap progress bar and a label for process feedback to the content of an HTML element.

How to setup

<div id="progress_example"></div>
<button type="button" class="btn btn-default" data-target="#progress_example"></button>
<script>
	$(document).ready(function(){
		$("#progress_example").ajax_progress({
			class : "progress-bar-success",	
			striped: true,
			url: "example.php/repetitive_server_function", 	
			onComplete: function(){
				alert("Done!");
			}
		});
	});
</script>

Server Response Structure

Server side must respond with a JSON response like:

{
	"error": false,
	"total_items": 150,
	"current_item": 75,
	"progress": 50,
	"continue": true
}

You have a php example with a valid response in example.php

jquery_ajax_progress's People

Contributors

juanluislopez89 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.