Here i am trying to close a modal dialog on a button click but it is not closing the dialog.Here is my code
function closemodal() {
alert("true");
$.modal.close();
return false;
}
and
protected void btnOK_Click(object sender, EventArgs e)
{
ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "ScriptRegistration", "closemodal();", true);
}
i need to call a javascript function and after that i need to close that dialog..Any suggestion??
EDIT:
$(document).ready(function () {
$('#MainContent_uscRetailParameters_btnOK').click(function (e) {
closemodal();
return false;
});
function closemodal() {
$.modal.close();
}
});
EDIT 2:
$('#CusCatPOPUP .basic').click(function (e)
{
$('#CusCatPOPUP-content').modal();
return false;
}
);
Unless I’m missing the point: