0

ajaxリクエストを実行しているときに、問題が見つからないかどうかを調べた後、このエラーに遭遇しました。以下のコードがあります。

$('#post_submit').click(function() {

var poster_id = <?php echo $session_user_id; ?>;
//firebug syntax error shows the line below is the problem
var profile_user_id: <?php echo $user_id; ?>;
var post = $('#post').val();
$.post('ajax_submit_post.php', 
    {
        profile_user_id: profile_user_id,
        poster_id: poster_id,
        comment_type : comment_type,
        post: post      
    }, 
    function () {
        $('#status').append('<li class="hide">Posted</li>').hide(1000); 
    }); 

});
4

1 に答える 1

2

等号を使うつもりだったと思いますか?

var profile_user_id = <?php echo $user_id; ?>;

それ以外の

var profile_user_id: <?php echo $user_id; ?>;
于 2012-09-08T18:48:07.077 に答える