2
我有一个表单,当满足某些条件时,它将调用一个JQuery UI弹出窗口。我需要做的是,按下OK按钮时,将弹出窗口的文本框中的内容写入窗体上的隐藏文本框。这可能吗?这似乎像我只需要调整我的弹出一点:从JQuery UI弹出窗口获取数据返回到表格
<script type="text/javascript">
//Total out of range dialog
$(function() {
$("#dialog2").dialog({
modal: true,
autoOpen: false,
width: 570,
buttons: {
"Ok": function() {
//I would think I just need a little code here which
// writes the value inside the textbox to the hidden
// textbox on the form?
$(this).dialog("close");
}
}
});
});
</script>
然后我弹出如下所示:
<div id="dialog2" title="ATTENTION">
<table style="width:565px; border-spacing:0px; border-collapse:collapse;">
<tr>
<td style="width: 240px">
<asp:Label ID="lblCommentBox" runat="server" Text="Comment:"></asp:Label>
<asp:TextBox ID="txtCommentBox" runat="server" CssClass="textbox"
TextMode="multiline" Wrap="True" Height="70px" Width="420px"
Font-Size="Small"></asp:TextBox>
</td>
</tr>
</table>
</div>