How to specify javascript to run when ModalPopupExtender is shown

前端 未结 8 739
有刺的猬
有刺的猬 2020-12-28 13:15

The ASP.NET AJAX ModalPopupExtender has OnCancelScript and OnOkScript properties, but it doesn\'t seem to have an OnShowScri

8条回答
  •  醉酒成梦
    2020-12-28 13:43

    You should use the BehaviorID value mpeBID of your ModalPopupExtender.

    function pageLoad() {
        $find('mpeBID').add_shown(HideMediaPlayer);
    }
    
    function HideMediaPlayer() {
        var divMovie = $get('<%=divMovie.ClientID%>');
        divMovie.style.display = "none";
    }
    

提交回复
热议问题