开发者

Cancel request in google ajax api

开发者 https://www.devze.com 2022-12-31 13:28 出处:网络
I\'m doing small AJAX searchbar with \"new google.search.WebSearch();\" f开发者_Go百科rom Google AJAX Api.

I'm doing small AJAX searchbar with "new google.search.WebSearch();" f开发者_Go百科rom Google AJAX Api.

How do i can cancel an ongoing ajax request?

I usually do a:

var xhr;
function Something() {
xhr.stop();
xhr = $.get ....
}

in jQuery.

What is the equavalent for the Google websearch object?


I don't know the Google AJAX API, but this page shows a method called .cancelSearch(). Maybe what you're looking for.

http://code.google.com/apis/ajaxsearch/documentation/reference.html#_intro_GSearchControl

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号