Sending JSON jQuery Ajax to PHP and back

后端 未结 4 1977
借酒劲吻你
借酒劲吻你 2021-01-27 12:46

I\'m having problems sending a JSON jQuery array via Ajax to a PHP script. What is the problem here:

var tee = $(\'#voting_image img\').attr(\'id\');
var vote =          


        
4条回答
  •  后悔当初
    2021-01-27 13:29

    Thanks for your responces, I went with:

    $.getJSON(
                '/vote_save.php?vote='+encoded,
                function(data) 
                {
                    $('#voting_hint_name').html(data.bob);
                    $('#voting_buttons').html('');
                }   
        );
    

    instead of $.ajax and it worked.

提交回复
热议问题