Trying to load Google charts through a jQuery ajax call

前端 未结 3 2078
南旧
南旧 2021-01-21 18:53

Originally posted this here: Trying to load Google charts through a (jQuery)ajax call but have modified my code a bit but I still can\'t get it to work properly.

I am t

3条回答
  •  遥遥无期
    2021-01-21 19:28

    First i would check if the the drawChart function behave correctly, next try updating your code to this

    $.post(
           "query.php",  
            {answer: "yes", poll_id: 5},  
            function(response){ 
              console.log(response); // check what the response from the server is
              drawChart(response);
            },
            'json' // the expected response data type
    );
    

提交回复
热议问题