My jQuery code for posting JSON doesn't work
11:06 06 Apr 2011

I would like to pass the value variable to the server. I have a form called

and a code area called

I am using this code to stringify and display the data in the code area:

var formData = form2object('testForm');
document.getElementById('testArea').innerHTML = JSON.stringify(formData, null, '\t');
var value = JSON.stringify(formData, null, '\t');

What I want is to send this data to a JSON file. I've been working on this project: http://ridegrab.com/profile_old/ and if you press the 'Submit Query' button you will see the head of the page populate.

Also I want use this script to send data:

function authenticate(userName, password) {
    $.ajax ({
        type: "POST",
        //the url where you want to sent the userName and password to
        url: 'username:password@link to the server/update',
        dataType: 'json',
        async: false,
        //json object to sent to the authentication url
        data: '{"userName": "' + userName + '", "password" : "' + password + '"}',
        success: function () {
            
        alert("Thanks!"); 
        }
    })
}
jquery json post