【发布时间】:2011-06-02 14:20:14
【问题描述】:
我有以下 javascript 函数
<script type="text/javascript">
function ShowAlert(id) {
// alert('I am here' + id);
$(id).dialog('open');
}
var dl;
$(document).ready(function () {
//setup edit person dialog
$('#editPerson').dialog({
//Setting up the dialog properties.
show: "blind",
hide: "fold",
resizable: false,
modal: true,
height: 400,
width: 700,
title: "Modify Member"
});
$("#<%=ButtonAdd.ClientID %>").click(function () {
var dl = $("#divDlg").dialog({
//Setting up the dialog properties.
show: "blind",
hide: "fold",
resizable: false,
modal: true,
height: 400,
width: 700
});
// dl.parent().appendTo(jQuery('form:first'));
});
//Adding a event handler for the close button that will close the dialog
$("a[id*=ButtonCloseDlg]").click(function (e) {
$("#divDlg").dialog("close");
return false;
});
});
在我的编辑按钮的 gridviews 项目模板中,我有以下调用函数。哪个可以显示警报但无法显示对话框?是不是因为网格上发生的回发导致它关闭?
<ItemTemplate>
<asp:Button ID="ButtonEdit" runat="server" CausesValidation="false"
CommandName="EditMember" OnClientClick='ShowAlert("#editPerson");'
Text="Edit" />
</ItemTemplate>
任何帮助将不胜感激。
【问题讨论】:
标签: jquery asp.net vb.net gridview dialog