开发者

Strange JavaScript issue with timeout

I see a developer using this in my site:

window.setTimeout("pg.init()", 10);

The problem is that when开发者_如何学Go I click once on the record set it works fine. However when I click on the record right away all I get is the hour glass. However if I wait and then click, it works again. What could be wrong? Any suggestions?


What happens if you invoke pg.init() without the timeout?

pg.init();

Alternatively, you could try a lower timeout, but that probably won't make any difference as it's already low:

window.setTimeout("pg.init()", 1);


Your question hardly makes any sense, but if I were to chance a guess, I would say disable the clickable element(s) (or removed the onclick handlers) within the record set once clicked, and add functionality to pg.init() which reactivates it/them.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜