0

I have a bit of jQuery that (I thought) would serialize, parse into JSON, and return JSON from a form. It looks like this:

$(document).ready(function() {    
        $('form').submit(function() {
            var formData =  $(this).serialize();
            var jsonData = $.parseJSON(formData);
            $.getJSON(jsonData);
            //alert(jsonData[0].name);
            console.log(jsonData);
            return false;
        });
    });

And the HTML looks like any normal form. But when I submit it, it just clears the form and doesn't log anything to the console.

Pete B.
  • 3,188
  • 6
  • 25
  • 38

0 Answers0