English 中文(简体)
j Query - Cancel$.post to prevent queuing
原标题:jQuery - Cancel $.post to prevent queuing

OK, So I am creating a entire web app using AJAX with some local storage etc.

我有时会重复点击,或迅速点击tab,用美元打字。

问题在于发出呼吁时,他们被召回,在最后呼吁回来之前保持对对方的过度敬重。

显然这是一个问题。 我需要做的是取消目前的专业考试委员会电话,刚刚获得最后的反馈。

我已尝试:

// Make Call:

if(call != undefined){
    call.abort();
}
var call = $.post(url,{do: stuff },function(response){
     // callback stuff:
}, json );

Keeps saying its undefined regardless, I rather use .POST than .AJAX if possible.

感谢你事先提供帮助!

最佳回答

在点击上点击的点击事件中, S倒了。

问题回答

如果取消对你所有待决的XHR,你可以做一件事:加固反面,将其带回你的后盾,使旧的对策不受新的束缚。 你的背后只是反应中的反面价值,然后,你的回击可以将其与当地反面进行比较,然后再推翻。





相关问题
selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

How to fire event handlers on the link using javascript

I would like to click a link in my page using javascript. I would like to Fire event handlers on the link without navigating. How can this be done? This has to work both in firefox and Internet ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Clipboard access using Javascript - sans Flash?

Is there a reliable way to access the client machine s clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google Docs do this? Do they use ...

javascript debugging question

I have a large javascript which I didn t write but I need to use it and I m slowely going trough it trying to figure out what does it do and how, I m using alert to print out what it does but now I ...

Parsing date like twitter

I ve made a little forum and I want parse the date on newest posts like twitter, you know "posted 40 minutes ago ","posted 1 hour ago"... What s the best way ? Thanx.

热门标签