我有这个Popup
<dxpc:ASPxPopupControl runat="server" ClientInstanceName="pcMFileBrowser" id="pcMFileBrowser" Modal="false"
HeaderText="Browse M Files" EnableClientSideAPI="True" PopupHorizontalAlign="WindowCenter"
PopupVerticalAlign="WindowCenter" CloseAction="None" ShowCloseButton="False" EnableAnimation="False">
<ContentCollection>
<dxpc:PopupControlContentControl ID="PopupControlContentControl1" runat="server">
<table>
<tr>
<td>
TEXT!
</td>
</tr>
</table>
</dxpc:PopupControlContentControl>
</ContentCollection>
和这个按钮:
<dxe:ASPxButton id="_ShowM" runat="server" Text="Browse M" Visible="false" skinid="WideButton" autopostback="False" ClientSideEvents-Click="function(s, e){pcMFileBrowser.Show();}" causesvalidation="False" enableclientsideapi="True" wrap="False"></dxe:ASPxButton>
但是当我点击按钮时它没有显示... 我试过
<dxe:ASPxButton id="_ShowM" runat="server" Text="Browse M" Visible="false" skinid="WideButton" autopostback="False" ClientSideEvents-Click="ShowPopup" causesvalidation="False" enableclientsideapi="True" wrap="False"></dxe:ASPxButton>
<script ......> function ShowPopup(s, e){pcMFileBrowser.Show();}</script>
但现在它总是排在最前面...... 谢谢!
答案 0 :(得分:0)
更改javascript以便返回false并且不回发。
<script>
function ShowPopup()
{
pcMFileBrowser.Show();
return false;
}
</script>
第二次改变你的称呼方式:
<dxe:ASPxButton id="_ShowM" ... ClientSideEvents-Click="return ShowPopup();" ...>