2
我有以下的javascript函数问题让我的jQuery的对话框打开并显示
<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;
});
});
在我的GridView的项目模板,我的编辑按钮,我有以下调用的函数。哪些工作来显示警报,但不能让它显示对话框?是否因为可能发生在网格上的回发导致它关闭?
<ItemTemplate>
<asp:Button ID="ButtonEdit" runat="server" CausesValidation="false"
CommandName="EditMember" OnClientClick='ShowAlert("#editPerson");'
Text="Edit" />
</ItemTemplate>
任何帮助将得到大大的appriated。