当我在下拉列表中选择值时,隐藏Popup控件扩展器 [英] Hide the Popup control extender when i select the value in dropdown

查看:60
本文介绍了当我在下拉列表中选择值时,隐藏Popup控件扩展器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在下拉列表中选择值时,我需要隐藏Popup控件扩展器,否则弹出窗口将显示...请帮助我

I need to hide the Popup control extender when i select the value in dropdown Otherwise the Popup will show... Pls Help Me

推荐答案

javascript,首先将一个behaviorID分配给扩展程序.然后使用以下代码将其关闭.

您的弹出式扩展程序标签:

To hide it with javascript, first assign a behaviorID to the extender. Then use the following code to close it.

your popup extender tag:

<ajaxToolkit:PopupControlExtender ID="PopupControlExtender1" BehaviorID="pop" runat="server" PopupControlID="Panel1" TargetControlID="Button1">
     </ajaxToolkit:PopupControlExtender>



在下拉菜单的onChange事件中调用hide()functipon.



call hide() functipon in onChange event of your drop down.

function hide()
{
     var e = document.getElementById("dropdown_Id");
     var strUser = e.options[e.selectedIndex].value;
     //i ssumed first element should be blank
     if(strUser!='')
     {       
        var bh =


find(" ); bh.hidePopup(); } 其他 { 返回 ; } }
find("pop"); bh.hidePopup(); } else { return false; } }


这篇关于当我在下拉列表中选择值时,隐藏Popup控件扩展器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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