开发者

Ajax auto refresh & javascript

开发者 https://www.devze.com 2023-01-10 08:48 出处:网络
I have a page which reloads a DIV with AJAX every 5 seconds. I also have an AJAX sorting script (you can see it here). The sorting script works great when I visit the page for first time, but when the

I have a page which reloads a DIV with AJAX every 5 seconds. I also have an AJAX sorting script (you can see it here). The sorting script works great when I visit the page for first time, but when the page is ref开发者_如何学编程reshed it doesn't work.

Am I doing something wrong? I have the sorting script in the HEAD tag, and the refresh on the bottom because I want to use some PHP variables there.


If your refresh code repopulates the <div>, it's probably destroying the event handler associations that your table sorter established. Perhaps you need to re-run the table sorter initialization after each refresh.

0

精彩评论

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

关注公众号