PDF隐藏jQuery的模态在Safari [英] PDF hides Jquery Modal in Safari

查看:164
本文介绍了PDF隐藏jQuery的模态在Safari的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是一些关系到我的这个问题。在IE中,我在对话框中使用iframe中解决问题。所以它工作正常。但在Safari我仍然面临着问题,但我已经采取的iframe到对话框。 Safari浏览器版本为 5.1.7(7534.57.2)

This is something related to my this question. In IE, I resolved issue using iframe in dialog. So it works fine. But in safari I am still facing problem though I have taken iframe into dialog. Safari browser version is 5.1.7(7534.57.2).

下面是code我曾尝试:

Here is the code I have tried:

<div>
    <iframe allowtransparency="true" style="width :100%;height:68em" id="FaxPdf" src='@Url.Action("GetPDF", "Base", new { pdfPath = @Model.PDFPath })'></iframe>
</div>
<img id="addPatient" title="Add/Select Patient" src="~/Content/Images/AddNewSmall2.png" style="height:20px;width:20px;cursor:pointer;float:right" />
<div id="dialog" style="width: 100%; height: 100%; background-color: lightgray; display: none; ">
    <iframe id="patientFrame" frameborder="0" marginwidth="0" marginheight="0" style="width:100%;height:60em"></iframe>
</div>

$('#addPatient').click(function () {
  $('#dialog').dialog('open');
});
$('#dialog').dialog({
  autoOpen: false,
  title: 'Add/Select Patient',
  height: 'auto',
  width: '90%',
  position: ['top', 50],
  draggable: false,
  show: 'blind',
  hide: 'blind',
  modal: true,
  open: function (event, ui) {
    $.ajax({
      url: '@Url.Action("ManagePatient","Order")',
      type: 'GET',
      cache:false,
      success: function(data){
      setTimeout(function () {
        var frameSet = document.getElementById("patientFrame");
        var iframedoc = frameSet.document;

        if (frameSet.contentDocument)
          iframedoc = frameSet.contentDocument;
        else if (frameSet.contentWindow)
          iframedoc = frameSet.contentWindow.document;

        if (iframedoc){
          iframedoc.open();
          iframedoc.writeln(data);
          iframedoc.close();
        }
      },400);
    },
    error: function () {
      window.location.href = '@Url.Action("Index","Error")';
    }
  });
},
close: function (event, ui) {
  $("#patientFrame").attr("src", '');
}
});

您可以在这里看到问题形象。的对话框右半侧是由PDF阻止。

You can see problem image here. Right half side of Dialog is blocked by PDF.

推荐答案

特别是,我认为z-index的可能应对这样你就可以应用的z-index做的问题。

Particularly,i think z-index may be the issue to deal with so you can do it with applying a z-index

另一方面
Bgiframe
是你应该找到在插件

on the other hand Bgiframe is the plugin you should find in

一别注,
通过互联网阅读一些文章后,我发现,PDF是由Acrobat Reader软件插件加载。
它是一种separte一个人无关,与HTML
所以,当你调用任何PDF或显示任何文件,那么它会调用插件和您的PDF将显示
在另一方面,你有超过一个显示器无法控制,如果你有第三方插件特别喜欢一个acrobad阅读器。
所以我的想法,我从这里

One another note, after reading some articles over a internet i found that pdf is loaded by the Acrobat Reader plugin. Its a separte one has nothing to do with html so when you call any pdf or show any file then it will call a plug in and your pdf will be shown on the other hand you have no control over a display if you have third party plugin particularly like a acrobad reader. So my idea which i got from here

您应该使用两个iframe的一个例子可以在这里找到。

You should use two iframe an example could be found here

但毕竟,如果你设置的z-index:-1; 的位置是:绝对和你想要的元素显示的(覆盖)的设置的位置是:绝对的z-index:1 可能是你的解决方案。

But after all if you set z-index: -1; with position:absolute and element you want to show (overwrite) set position:absolute and z-index:1 could be a solution for you.

我必须提供更多的想法这是我从差异resources.thanks发现

i have provide more ideas which i found from diff resources.thanks

这篇关于PDF隐藏jQuery的模态在Safari的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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