Async trigger for an update panel refreshes entire page when triggering too much in too short of time

…衆ロ難τιáo~ 提交于 2019-12-02 05:01:44

Its is better to do something like that, and give him a breath :)

I place a timer, so you wait for 250Ms before its send the click. I always do that, I never call the search right way because when some one type a word, actually there is no reason for the program to search all the time....

Also this will avoid your problem that you have.

var hTimeOut = null;
$($(".CRM_Search_Box")[0]).keyup(
        function () {
            if(hTimeOut)
                clearTimeout(hTimeOut);
            hTimeOut = setTimeout(function() { $($(".CRM_Search_Button")[0]).click(); }, 250);            
        }
);
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!