php - posting serialized data with jquery ajax in IE6 not working

676

when i post some data with jquery ajax command in ie6 and i

print_r($_POST)

php print an empty array..

i can alert this data with alert function in ie by adding this line of code:

alert(form_data)

how can i post submited data to php?i dont know where the problem is in ie6? this is my code for posting data

$('#submit').live('click', function(e) {
        e.preventDefault();
        var post = $(this).attr("name") + "=submit";
        var form_data = $('#create_album_form').serialize() + "&" + post;
        $.ajax({
            type: "POST",
            url: "create_album.php",
            data: form_data
        }).done(function( data ) {
            $('#album_data').html('');
            $('#album_data').html(data);
            $('#album_data').delay(1000).trigger('reveal:close');
            if(data == '<div class="success">آلبوم شما با موفقیت ساخته شد</div>'){
                $('#myalbums').load('update_albums.php').fadeIn('500');
            }

        });


    });
772

Answer

Solution:

.live() is removed in jquery 1.9.x use.on() instead

People are also looking for solutions to the problem: php - Same Origin Policy Error , jQuery

Source

Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.