Giter Site home page Giter Site logo

jqueryajaxupload's Introduction

jQueryAjaxUplaod

This is a fork of the Really simple jQuery Ajax File Upload plugin by jainaewen. I forked this plugin to make a few changes to the original version as follows:

  • Added global ajax event support
  • Added URL Parameter
  • Minor Code Cleanup

Global Ajax Event Support

By default this plugin will trigger the default ajax events (.ajaxStart(), .ajaxStop(), .ajaxComplete(), .ajaxError(), .ajaxSuccess(), .ajaxSend()). Behaviour is specified by the 'global' option.

Added URL Parameter

The plugin can now be passed a url to which the form can post. This is useful when adjusting urls when javascript is enabled. For example if the default form url is /form-receive and you would like to send it to /json/form-receive)

Minor Code Cleanup

I figured since I'm in there, I might as well reformat the code to match my liking. And fix some spelling errors.

Usage

$('#form_id').ajaxUpload({
	global		: true,						// Trigger global ajax events
	url			: false,					// Replaces the form url
	iframeID	: 'iframe-post-form',		// Iframe ID.
	json		: false,					// Parse server response as a json object.
	post		: function () {				// Executed on submit
		console.log('Upload Posted');
	},
	complete	: function (response) {		// Executed after response from the server has been received
		console.log(response);
	}
});

jqueryajaxupload's People

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

jqueryajaxupload's Issues

error on load

Hi,
I have this error on load :
Uncaught TypeError: Cannot set property 'defaults' of undefined

It doesn't know $.fn.iframePostForm

Thanks

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.