IE6 Dropdownlist使用Ajax Modalpopupextender消失 [英] IE6 Dropdownlist disappears using Ajax Modalpopupextender

查看:65
本文介绍了IE6 Dropdownlist使用Ajax Modalpopupextender消失的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

我在下面插入了简单的示例代码,如果您使用IE 6运行它,则在显示Ajax modalpopupextender时,将看到dropdownlist控件消失.

有人可以告诉我如何修改此代码,以使dropdownlist控件不会消失.感谢您为解决此问题所提供的帮助.

谢谢你!

Hello,

I''ve inserted simple example code below that if you run it using IE 6 you will see the dropdownlist control disappears when you display a Ajax modalpopupextender.

Can someone show me how to modify this code so that the dropdownlist control does NOT disappear. I appreciate any help to solve this problem.

Thank You!

<![CDATA[<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebApp.WebForm1" %>]]>
<![CDATA[<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>]]>
<html>
<head runat="server">
</head>
<body>
    <form id="form1" runat="server">
    <asp:scriptmanager id="ScriptManager1" runat="server" xmlns:asp="#unknown">
    </asp:scriptmanager>
    <div>
        <table>
            <tr>
                <td>State:</td>
                <td>
                    <asp:dropdownlist id="ddlState" runat="server" autopostback="true" xmlns:asp="#unknown">
                        <asp:listitem>WI</asp:listitem>
                        <asp:listitem>NY</asp:listitem>
                        <asp:listitem>GA</asp:listitem>
                    </asp:dropdownlist>
                </td>
            </tr>
            <tr>
                <td> </td>
            </tr>
            <tr>
                <td></td>
                <td>
                    <asp:button runat="server" text="Try It Using IE6" id="btnTryIt" onclick="btnTryIt_Click" xmlns:asp="#unknown" />
                </td>
            </tr>        
        </table>
    </div>
    <asp:button id="btntar" runat="server" style="display: none" xmlns:asp="#unknown" />
    <cc1:modalpopupextender id="mpePanel" runat="server" targetcontrolid="btntar" behaviorid="ClosePanel" xmlns:cc1="#unknown">
          PopupControlID="pnlTest"&gt;
    </cc1:modalpopupextender>
    <asp:panel id="pnlTest" runat="server" backcolor="Brown" width="300px" height="250px" enableviewstate="false" xmlns:asp="#unknown">
        <div style="color: White;">I created this simple example of a dropdown control (that disappears) using an AJAX ModalPopupExtender. Can someone modify this code where the state DROPDOWN CONTROL will not disapper in IE6 while this modalpopup window is displayed? I would greatly appreciate it!</div>
        <div align="center" style="padding-top: 20px;">
            <input type="button" runat="server" id="btnClose" onclick="$find('ClosePanel').hide();" value="Close" />  
        </div>
    </asp:panel>    
   
    </form>
</body>
</html>


using System;
using System.Web;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
namespace WebApp
{
    public partial class WebForm1 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
        }
        protected void btnTryIt_Click(object sender, EventArgs e)
        {
            mpePanel.Show();
        }
    }
}

推荐答案

find('ClosePanel').hide();" =" / > < /div > < /asp:panel > < /form > < /body > < /html >
find('ClosePanel').hide();" value="Close" /> </div> </asp:panel> </form> </body> </html>


using System;
using System.Web;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
namespace WebApp
{
    public partial class WebForm1 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
        }
        protected void btnTryIt_Click(object sender, EventArgs e)
        {
            mpePanel.Show();
        }
    }
}


下拉列表组件被显式隐藏,因为在IE6中,否则它会位于modalpopup之上.使用div元素作为弹出窗口的大多数优秀javascript弹出库都可以做到这一点.查看下面的链接(虽然该链接通常在网站上不可用),然后在页面底部查看示例.在此之上,您会看到一个使用IE6时隐藏的下拉菜单.

http://www.javascripttoolbox.com/lib/popup/example.php [ ^ ]

通常,下拉菜单将在关闭弹出窗口后再次显示.

祝你好运!
The dropdown component is explicitly hidden because in IE6 this would otherwise be above the modalpopup. Most good javascript popup libraries that use div element as popup do this. Look at the link below (that is not normally available on the site though) and view the example on the bottom of the page. Above that you see a dropdown that is hidden when using IE6.

http://www.javascripttoolbox.com/lib/popup/example.php[^]

Normally the dropdown will be shown again after the popup is closed.

Good luck!


停止!

对IE6不执行任何操作,拒绝对其进行操作,破坏所有需要它的产品!

它不受支持,存在重大缺陷,并且正在全球范围内逐步淘汰.

如果人们仍然使用它并且可以找到功能,那就是他们的监视点.
STOP!

Do nothing for IE6, refuse to work on it, sabotage every product that requires it!

It is unsupported, has major flaws and is being phased out across the world.

If people still use it and can find functionality, that is their lookout.


这篇关于IE6 Dropdownlist使用Ajax Modalpopupextender消失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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