将jquery对话框的隐藏值检索到HTML div

将jquery对话框的隐藏值检索到HTML div,jquery,html,Jquery,Html,我有两个单选按钮,单击单选按钮时,使用jquery的对话框api弹出一个jquery对话框,对话框中有一个隐藏字段,因此现在我需要在单选按钮所在的div标记(页面中)中的背景html中隐藏值 HTML代码: <input type="radio" class="f_auth" name="f_auth_type" value="a"/>A <input type="radio" class="f_auth" name="f_auth_type" value="b" />B

我有两个单选按钮,单击单选按钮时,使用jquery的对话框api弹出一个jquery对话框,对话框中有一个隐藏字段,因此现在我需要在单选按钮所在的div标记(页面中)中的背景html中隐藏值

HTML代码:

<input type="radio" class="f_auth" name="f_auth_type" value="a"/>A
<input type="radio" class="f_auth" name="f_auth_type" value="b" />B

OnClicking of radio button 'A' my dialog box pops up in which through a jquery call to separate file from this dialog box, as  i am saving the response in a hidden field in the dialog box , so now i want that value of the hidden file in the background html

<div id="dialog" title="Basic dialog" style="display:none;">
<input type="hidden" name="chk" value="chk"/>
</div>
<div id="display1"></div>

请帮助我。

向我们展示您到目前为止尝试过的javascript和html。您的问题不太清楚。您是否正在尝试将对话框的值(假设有输入)显示在背景html的div中?现在您可以检查我的代码了attached@shrmn是的,同样的东西我想要你刚才发布的东西。@Esa现在你可以找到所附的代码
var button_val = $("input[name='f_auth_type']:checked").val();
if(button_val == "A") {
$( "#dialog" ).dialog( "open" );
}
else {
$( "#dialog" ).dialog( "close" );
}

$('#dialog').dialog({
              modal: 'true',
              title: 'Train a Form',
              height: 550,
              width: 450,
              buttons:
                    {
                 Ok: function() {               
                  $( this ).dialog( "close" );
             },
             Cancel: function() {       
                  $( this ).dialog( "close" );
             }
            },
                });