function ClickRtn() { RtnValue('aaa'); }// ClickRtn()
showModelessDialog() Variant that returns a reference to the new window object. Use this reference to script properties and methods on the new window.返回值为一个新的对象,通过对象可以对打开的页面进行操作修改: showModelessDialog ==> showModalDialog():_)
is return_value.value?
function ClickRtn()
{
parent.returnValue='aaa';
parent.close()
}// ClickRtn()
function test(a){
sType.value=a
}
</script>
<input type=text size=7 name="sType" value="" tabindex="1">
<a href="javascript:void(0)" title="快捷搜索"><font onclick='window.showModelessDialog("3.htm",test,"center:Yes; help: No; resizable: Yes; status: No;")
'><b>→</b></font></a>
3.htm
-------
<script>
var arg=window.dialogArguments
arg('hello')
</script>
{
RtnValue('aaa');
}// ClickRtn()
Variant that returns a reference to the new window object.
Use this reference to script properties and methods on the new window.返回值为一个新的对象,通过对象可以对打开的页面进行操作修改:
showModelessDialog ==> showModalDialog():_)
<input id=sType type=text>
<script>
function Test()
{
showModalDialog("t2.htm",window,'dialogwidth=300px;dialogheight=200px');
}
Test();
</script>
t2.htm
<script>
var sData = dialogArguments;
sData.sType.value = 1;
</script>
<input type=text size=7 name="sType" value="" tabindex="1"><a href="javascript:void(0)" title="快捷搜索"><font onclick='sType.value = window.showModelessDialog("dialogFrame.asp",window,"center:Yes; help: No; resizable: Yes; status: No;")'><b>→</b></font></a>在我的dialogFrame.asp里有一个javacrip函数:
<script language="javascript">
var sData = dialogArguments;
function RtnValue()
{
sData.document.all("sACCOUNTUNIT_NO").value = "BBBBBB";
}
</script>在我的dialogSearch.asp点击某一行后调用的函数是:
<script language="javascript">
function ClickRtn()
{
parent.window.RtnValue('aaa');
parent.window.close();
}// ClickRtn()
</script>
谢谢各位
好了,解决了,如下
在我的main2.asp里文本框代码是这样的:
<input type=text size=7 name= "sType " value= " " tabindex= "1 " > <a href= "javascript:void(0) " title= "快捷搜索 " > <font onclick='window.showModalDialog( "dialogFrame.asp ",window, "center:Yes; help: No; resizable: Yes; status: No; ")' > <b >→ </b > </font > </a >
在我的dialogFrame.asp里有一个javacrip函数:
<script language= "javascript " >
var sData = dialogArguments;
function RtnValue()
{
sData.document.all( "sType").value = "BBBBBB ";
}
</script >
在我的dialogSearch.asp点击某一行后调用的函数是:
<script language= "javascript " >
function ClickRtn()
{
parent.window.RtnValue('aaa');
parent.window.close();
}// ClickRtn()
</script >
谢谢各位