Skip to content Skip to sidebar Skip to footer

Refreshing Ajax Div With Form Data

I've googled a lot but could not find the solution to this problem: I have a div in my main page that loads another page with the JQuery function '.load'. This works well. In this

Solution 1:

Something like this should work:

$('#formpie').on('submit', function(e) {
    e.preventDefault();

    $.ajax({
        type: 'POST',
        url: "imglib.php",
        async: false,
        data: $(this).serializeArray(),
        success: function(data) {
            $('#dialog-form').html(data);
        }
    });
});

You should send the data with the post. It won't automaticly send the form data along.

Post a Comment for "Refreshing Ajax Div With Form Data"