将值传递到jquery对话框

将值传递到jquery对话框,jquery,Jquery,我想将一个值传递到jquery对话框中。出于几个原因,该页面位于iFrames中。该过程首先从iframe中的页面启动此函数: <Tr onclick="fireOpen1(true,myValue)"> 调用父页面上的开场白: function openDialog1() { // called by the inner iframe $('#dialog1').dialog({ show: "fold", hide: "explode", width: 600, height:

我想将一个值传递到jquery对话框中。出于几个原因,该页面位于iFrames中。该过程首先从iframe中的页面启动此函数:

<Tr onclick="fireOpen1(true,myValue)">
调用父页面上的开场白:

function openDialog1() { // called by the inner iframe
$('#dialog1').dialog({
show: "fold",
hide: "explode",
width: 600,
height: 200,
buttons: {
    Close: function () {
        $(this).dialog("close");
    }
}
});
}
这是我的div,包含对话框的内容:

<div id="dialog1" > 
   <form name="theForm" action="frames.asp" method="post">
 <input type="hidden" name="theID" value="0">
</form>
 the id is <%= request.form("theID") %> ...
</div>

身份证是。。。

对话框显示没有问题,但“我的值”不可用。如何传递此值。我之所以使用这种方法,是因为我想将对话框从打开程序中分离出来,这样当打开程序重定向时,对话框可以保留在那里。谢谢

您错过了
输入字段中的id

<input type="hidden" name="theID" value="0">

应该是

<input type="hidden" name="theID" id="theID" value="0">


您可以执行
parent.$('dialog1').data('v',myValue)就在父.openDialog1()之前openevent
中访问它,例如
var v=$('#dialog1')。数据('v')

是的,就是这样。谢谢您的时间和建议,非常感谢。你今天过得很好……我还以为它行得通……我有点困惑,它现在不行了。如何将值写入div内的对话框?感谢您当我在parent.openDialog1()之前放置parent.$('#dialog1').data('v','aValue')时,I get I get object不支持此属性或方法,当我在open事件中放置var v=$('#dialog1').data('v')时,我会得到预期的标识符、字符串或数字。我已经发布了一个回复,告诉你我是如何使用它们的。
<input type="hidden" name="theID" id="theID" value="0">