0

在 IE 6 中启动模式 radwindow 时,父页面上可见的任何下拉菜单都将被隐藏。一旦它们被隐藏,即使在模式关闭后它们也会消失。这些是纯 ASP.NET 下拉列表。隐藏的下拉菜单没有什么特别之处——我可以在页面中添加新的下拉菜单,其中没有任何内容,并且它们在启动时仍然会消失。有什么想法吗?

我正在使用 Telerik 的 ASP.NET AJAX 控件的 ASP.NET 3.5, 2009 Q3,在运行 Windows 2000 的虚拟机上使用 IE 6 (6.0.2600) 进行测试。

虽然这个问题最初是在一个更复杂的页面上遇到的,但我创建了一个全新的页面,没有 css,只是简单的元素,它仍然发生在 IE 6 中。

<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="WebForm1.aspx.vb" Inherits=".WebForm1" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <telerik:RadScriptManager ID="manager1" runat="server">
        </telerik:RadScriptManager>

        <asp:DropDownList ID="ddl1" runat="server">
            <asp:ListItem Value="1">Item 1</asp:ListItem>
            <asp:ListItem Value="2">Item 2</asp:ListItem>
            <asp:ListItem Value="3">Item 2</asp:ListItem>
        </asp:DropDownList>
        <asp:Button ID="btn1" runat="server" OnClientClick="ShowModal(); return false;" Text="click" />
    </div>
            <telerik:RadWindowManager ID="RadWindowManager1" runat="server" />
    <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">

        <script type="text/javascript">
            function ShowModal() {
                var wnd = radopen('<%=ResolveUrl("~/register.aspx") %>', null);
                wnd.set_modal(true);
                wnd.center();
                wnd.set_behaviors(Telerik.Web.UI.WindowBehaviors.Close + Telerik.Web.UI.WindowBehaviors.Move + Telerik.Web.UI.WindowBehaviors.Resize);
                wnd.show();
                return false;
            }
        </script>

    </telerik:RadScriptBlock>
    </form>
</body>
</html>

似乎当显示模式设置为 true 的 radwindow 时,下拉菜单的可见性属性被设置为隐藏。将 modal 设置为 false,下拉列表很好...谢谢

丹·阿普尔亚德

4

2 回答 2

1

We've talked in Telerik's forum and I just wanted to add the info here as it could be of help for other users:

The problem here is with the logic. With your code you do the following:

  1. open the RadWindow control
  2. set its modal property to true. In this case we are hiding the dropdowns in IE6.
  3. set the behaviors of the control
  4. center the window (I assume you do this to redraw the window after setting its behaviors).
  5. You call the show() method again. Because you are calling show() for a window that is modal, the code that hides the dropdowns is run again - that is the reason for them not being visible after the window is closed.

To avoid the problem, I suggest not to call show() again, but to call the center() method last.

RadWindow explicitly hides the dropdowns in IE6 because prior to IE7, dropdowns and list items were heavyweight objects that were rendered above all DHTML elements on the page, including the modal background of RadWindow. This made possible for users to still use the dropdowns on the parent page even if a modal RadWindow was shown. To avoid that we disable the dropdowns if the browser is IE7+ and hide them completely if it is IE6.

于 2010-07-07T08:59:52.920 回答
0

您正在运行什么版本的 ASP.NET,以及什么版本的 Teleriks Rad Window?我对旧版本有很多问题,但他们的新版本似乎运行良好。

我会在单独的页面上对其进行测试。

  1. 创建一个随机填充几个 DDL 的新页面
  2. 向它添加一个基本的 rad 窗口控件 - 并将其连接起来以便可以调用它

看看你是否可以重新创建问题。如果你不能,那么很可能是 CSS、JavaScript 或 HTML 标记。

编辑:还记得 IE6 有下拉问题。通常主要问题是下拉列表总是在所有其他控件之上,但如果它与浏览器相关,我不会屏住呼吸。

于 2010-06-25T17:39:21.477 回答