Asynchronous COMET query with Tornado and Prototype

后端 未结 4 704
说谎
说谎 2021-01-30 15:10

I\'m trying to write simple web application using Tornado and JS Prototype library. So, the client can execute long running job on server. I wish, that this job runs Asynchronou

4条回答
  •  天命终不由人
    2021-01-30 15:45

    function test(){
                new Ajax.Request("http://172.22.22.22:8888/longPolling",
                {
                    method:"get",
                    asynchronous:true,
                    onSuccess: function (transport){
                        alert(transport.responseText);
                    }
                })
            }
    

    should be

    function test(){
                new Ajax.Request("/longPolling",
                {
                    method:"get",
                    asynchronous:true,
                    onSuccess: function (transport){
                        alert(transport.responseText);
                    }
                })
            }
    

提交回复
热议问题