IE8对象预期JQuery .ready函数

时间:2013-11-28 09:59:45

标签: javascript jquery internet-explorer-8 object-expected

我在head标签中调用了以下函数。

Page::IncludeJavascriptFile('js/packages.js');
Page::AddHeadElement('
    <script type="text/javascript">
        $(document).ready(function() {
            pollClientTable('.TriplecastConfig::get('transfer_polling_period')*1000 .', true);
        });
    </script>
');

pollClientTable在函数调用之前的packages.js中定义。

pollClientTable函数:

var pollClientTableTimer = null;
var pollClientTableTimerPoll = null;
function pollClientTable(poll, async) {
clearTimeout(pollClientTableTimer);
$.ajax({
    url: "ajax_requests/getClientPackages.php",
    async: async,
    timeout: poll,
    success: function(data) {
        $('#packagesForm').empty();
        $('#packagesForm').append(data);
    }
});
    pollClientTableTimerPoll = poll;
    pollClientTableTimer = setTimeout(function(){pollClientTable(poll, true);}, poll);
}

这些功能适用于任何其他浏览器栏IE8。有什么想法吗?

0 个答案:

没有答案