我用来加载Pdf的对象标记的Onload事件不会在Chrome上触发 [英] Onload Event Of Object Tag Which I Have Used To Load Pdf Does Not Fire On Chrome

查看:126
本文介绍了我用来加载Pdf的对象标记的Onload事件不会在Chrome上触发的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

i am using the object tag to load the pdf...

i have been using onreadystatechanged to remove the loading spinner. its working fine for IE and Firefox but in Chrome and safari the loading spinner does not stop..it keeps spinning

this is my object tag code

<object class="boxfull" type="application/pdf" onreadystatechange="return hideloading();" data="@Url.Action("ReportPDF", new { ReadingID = ViewBag.ReadingID})">
<object>

hideloading() is a function which contains

    function hideloading(a) {
        $("#loading-overlay, #loading").hide();
        return false;
    }

i am hiding the loading spinner and overlay..

But its not solved for Chrome and Safari.. i think its not taking the event of onreadystatechange.

Plz help

推荐答案

(#loading-overlay,#loading)。hide();
返回false;
}

我正在隐藏加载微调器和叠加..

但是Chrome和Safari没有解决它...我认为它没有接受onreadystatechange的事件。

Plz帮助
("#loading-overlay, #loading").hide(); return false; } i am hiding the loading spinner and overlay.. But its not solved for Chrome and Safari.. i think its not taking the event of onreadystatechange. Plz help

在chrome中不支持


onreadystatechanged。
onreadystatechanged is not supported in chrome.


在最新的浏览器中版本,对象标签不再支持application / pdf类型。
In the latest browser versions, object tag no longer supports application/pdf type.


这篇关于我用来加载Pdf的对象标记的Onload事件不会在Chrome上触发的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆