Skip to content

Latest commit

 

History

History
44 lines (39 loc) · 967 Bytes

README.md

File metadata and controls

44 lines (39 loc) · 967 Bytes

formize

A jQuery plugin. The opposite of .serialize. It takes a query string and loads it into a

.

Usage

    $("form").formize(); // uses location.search 
    
    $("form").formize(parseSearchResult);

parseSearch

Usage

    var formObject= parseSearch() // uses location.search
    
    var formObject= parseSearch(aQueryString)

serializeFormData

Usage

$.ajax({
    url: "YourServerProgram",
    type: "POST", // required
    processData: false, // required
    contentType: false, // required
    data: $("form").serializeFormData(), // sends the files as well!
    success: function() {
        console.log("Uploaded.", arguments)
    },
    error: function() {
        console.log("Error Uploading.", arguments)
    },
})

extra examples

/* make an 'JSON' object to send using AJAX */
var json = parseSearch($("form").serialize())