Iframe issue when i open pdf dialog box goes behind pdf

会有一股神秘感。 提交于 2019-12-24 11:43:02

问题


I am facing big issue in my site, even after googling lot of I didn't find any perfect solution.

In my web site I have included iframe in one page for viewing pdf files, But when I open dialog box it goes behind that pdf. I know the reason that pdf plugin is not rendering as part of page that's why it always display on the top.

Anyhow I need to display dialog box on the top of the pdf. I have tried following solution but nothing work, Adjusting z-index, pdfobject, embed tag, I can't adjust my dialog box according to pdf.

Except these any of the perfect solution if you have then please help regard this.

This is my sample page

Thank you.


回答1:


I've had a similar problem with a file upload form I use thats within a jquery ui dialogue. I use this snippet:

 function getMaxZ() {
        var opt = { inc: 5 };
        var def = { inc: 10, group: "*" };
        $.extend(def, opt);
        var zmax = 0;
        $(def.group).each(function () {
            var cur = parseInt($(this).css('z-index'));
            zmax = cur > zmax ? cur : zmax;
        });
        zmax += def.inc;
        return zmax;
    }
     var zIndexMax=getMaxZ();

$("#"+gridName).css({"z-index": Math.round(zIndexMax)});

Works like a charm for me, before my popup dialogues would appear behind the jquery ui one, now they don't. Hopefully it'll help you out.



来源:https://stackoverflow.com/questions/15084179/iframe-issue-when-i-open-pdf-dialog-box-goes-behind-pdf

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!