Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including submitter with all npm packages installed. Try it out:

var submitter = require("submitter")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

submitter v0.0.7

Automatically submitting forms with XHR2


Automatically submitting forms with AJAX


  • Recover all data of inputs in form
  • Recover div content as inputs content
  • Allow submit button outside the form (add target="your-form-name" to your submit input)
  • Use img tags as input[type="file"]


Download and extract the last release from here or install with Bower

$ bower install submitter


Link submitter.js from your html file

<script src="path/to/submitter.js"></script>

or load it with browserify in your .js file

var submitter = require("path/to/submitter.js");

Then apply submitter to your form

var options = {
    init : function () {
        // do something on start request
    finish : function () {
        // do something on start request
    progress : function (p) {
        // do something with 'p' (percentaje, number 0-100)
    fail : : function (error) {
        // do something with error after failed request
    success : function (data) {
        // do something with data after successfull request

submitter('your_form_name', options);

© 2014 jacoborus

Released under MIT License


RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free