当用户点击“评论”按钮时。
<input id="SubmitCommentsToInvoice" type="button" value="Comments" onclick="ShowCommentBox('<%: item.DBId %>', '<%: item.LabourOrPlant %>', '<%: item.ActivityDescription %>')" />
一个文本区域加载,带有一个提交按钮。当用户完成输入数据并单击“提交”时,我希望该框消失。(返回正常屏幕查看)
<div id="dialog" title="Comments" style="display:none;">
<textarea id="BlankBox" type="text" runat="server" rows="7"
maxlength="2000" />
<input id="SubmitComment" type="button" value="Submit"
onclick="SubmitButton()" />
</div>
function SubmitButton() {
var commentBoxData = $('#<%=BlankBox.ClientID%>').val();
WorkItemMgr.CommentBoxForInvoiceUpdates(id, LabouringOrPlanting, commentBoxData, testForSuccess);
}
function testForSuccess(CommentSuccessfullyUpdated)
{
if (CommentSuccessfullyUpdated == "TRUE")
{
//$('#' + IdCommentBox).hide();
// $('#<%=BlankBox.ClientID%>').hide(); just hides comment box need to hide entire thing
$("#dialog").dialog({ modal: true }).hide();
//IN HERE I WOULD LIKE TO HIDE THE DIV (MY ATTEMPTS SEEN ABOVE)
}
else if (CommentSuccessfullyUpdated == "False")
{
showLoadingImage.src = "../Images/X.png";
}
}
我的尝试隐藏了 textarea,但我想再次隐藏整个 div 并恢复正常的屏幕查看(摆脱 modal:true)