jqModal 对话框始终处于叠加状态

发布于 2024-08-30 21:38:21 字数 1267 浏览 4 评论 0原文

我有以下代码,但我束手无策,因为对话框总是出现在覆盖层下。任何建议将不胜感激:

<head runat="server">
    <title></title>
    <link href="../Styles/jqModal.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        #shift-edit-popup
        {
            display: none;
        }
    </style>
    <script src="../Scripts/jquery-1.4.2.js" type="text/javascript"></script>
    <script src="../Scripts/jqModal.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(function () {
            $("#shift-edit-popup").jqm({
                toTop: true
            }).jqmAddTrigger("#show-button");
        });
    </script>
</head>
<body>
    <form id="form" runat="server">
    <input id="show-button" type="button" value="Show" />
    <div id="shift-edit-popup">
        <div>
            <asp:Label ID="resourceLabel" runat="server" AssociatedControlID="resourceList">Resource:</asp:Label>
            <asp:DropDownList ID="resourceList" runat="server" DataTextField="Name" DataValueField="ResourceId" Width="120px">
            </asp:DropDownList>
        </div>
    </div>
</body>

I have the following code, and am at my wit's end because the dialog always appears under the overlay. Any advice will be most appreciated:

<head runat="server">
    <title></title>
    <link href="../Styles/jqModal.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        #shift-edit-popup
        {
            display: none;
        }
    </style>
    <script src="../Scripts/jquery-1.4.2.js" type="text/javascript"></script>
    <script src="../Scripts/jqModal.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(function () {
            $("#shift-edit-popup").jqm({
                toTop: true
            }).jqmAddTrigger("#show-button");
        });
    </script>
</head>
<body>
    <form id="form" runat="server">
    <input id="show-button" type="button" value="Show" />
    <div id="shift-edit-popup">
        <div>
            <asp:Label ID="resourceLabel" runat="server" AssociatedControlID="resourceList">Resource:</asp:Label>
            <asp:DropDownList ID="resourceList" runat="server" DataTextField="Name" DataValueField="ResourceId" Width="120px">
            </asp:DropDownList>
        </div>
    </div>
</body>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

提赋 2024-09-06 21:38:21

从我所看到和尝试的情况来看,您需要在对话框 div 上使用包含的 jqmWindow 类并删除此内容:

<style type="text/css">
    #shift-edit-popup
    {
        display: none;
    }
</style>

您的代码应该如下所示:(

<head runat="server">
    <title></title>
    <link href="Scripts/jqModal.css" rel="stylesheet" type="text/css" />

    <script src="Scripts/jquery-1.4.2.js" type="text/javascript"></script>
    <script src="Scripts/jqModal.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(function () {
            $("#shift-edit-popup").jqm({
                toTop: true,
                modal: true
            }).jqmAddTrigger("#show-button");
        });
    </script>
</head>
<body>
    <form id="form" runat="server">
    <input id="show-button" type="button" value="Show" />
    <div id="shift-edit-popup" class="jqmWindow">
        <div>
            Resource:
            <select><option value="1">One</option><option value="2">Two</option></select>
        </div>
    </div>
</body>

您只需要相应地更改脚本和 css 引用)

From what I saw and tried you need to use the included jqmWindow class on your dialog div and drop the this:

<style type="text/css">
    #shift-edit-popup
    {
        display: none;
    }
</style>

Your code should look something like this:

<head runat="server">
    <title></title>
    <link href="Scripts/jqModal.css" rel="stylesheet" type="text/css" />

    <script src="Scripts/jquery-1.4.2.js" type="text/javascript"></script>
    <script src="Scripts/jqModal.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(function () {
            $("#shift-edit-popup").jqm({
                toTop: true,
                modal: true
            }).jqmAddTrigger("#show-button");
        });
    </script>
</head>
<body>
    <form id="form" runat="server">
    <input id="show-button" type="button" value="Show" />
    <div id="shift-edit-popup" class="jqmWindow">
        <div>
            Resource:
            <select><option value="1">One</option><option value="2">Two</option></select>
        </div>
    </div>
</body>

(You just need to change the script and css references accordinly)

剩余の解释 2024-09-06 21:38:21

我相信你需要设置shift-edit-popup的位置:

<style type="text/css">
    #shift-edit-popup
    {
       display: none;
       position : relative;
    }
</style>

I believe you need to set position of the shift-edit-popup:

<style type="text/css">
    #shift-edit-popup
    {
       display: none;
       position : relative;
    }
</style>
诗笺 2024-09-06 21:38:21

您使用哪个版本的 jqModal.js?

来自 http://dev.iceburg.net/jquery/jqModal/ 的最新官方版本与 jQuery 1.4.x 不兼容(请参阅 http: //forum.jquery.com/topic/jqdnr-dragging-problem-with-jquery-1-4http://www.trirand.com/blog/?page_id=393/bugs/jqgrid-jquery-1-4/) 。

如果在您的版本中,“$()”存在于 jqModal.js 中,则应将其替换为“$(document)”。您还可以下载固定版本作为 jqGrid 包的一部分:http://www.trirand。 com/blog/?page_id=6

Which version of jqModal.js do you use?

The last official version from http://dev.iceburg.net/jquery/jqModal/ is not compatible with jQuery 1.4.x (see http://forum.jquery.com/topic/jqdnr-dragging-problem-with-jquery-1-4 and http://www.trirand.com/blog/?page_id=393/bugs/jqgrid-jquery-1-4/).

If in your version "$()" exist inside of jqModal.js, it should be replaced with "$(document)". You can also download fixed version as a part of jqGrid package: http://www.trirand.com/blog/?page_id=6.

筱果果 2024-09-06 21:38:21

检查叠加层和模态框的 z-index 值。

Check the z-index values of the overlay and the modal box.

み零 2024-09-06 21:38:21

也许这会有助于阅读:了解 z-index

Perhaps this will be helpful reading: Understanding z-index

傲影 2024-09-06 21:38:21

不久前我遇到了这样的问题。尝试将 DOCTYPE 更改为:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

I ran into a problem like this not to long ago. Try changing the DOCTYPE to this:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文