这种问题以前已经有人提出过了!  在主页面中加入一个<iframe name=test style="display: none"></iframe>
在showmodaldialog出来的页中用<form target=test …>…</form>。

解决方案 »

  1.   

    或者你把<form action=当前网页自身>就行了,这样这个页面作到既显示内容又能处理提交表单。
      

  2.   

    或者把 form 的 action 设为自身页。 这样的情况下,这个页必须既能显示内容,又能处理提交表单。(用 if response("submit") <> "" then ...判断.
      

  3.   

    cawangjun(心驿) lvenlee(大头) 谢谢二位指正。
    我没有做实验,而想当然的轻易下结论实在是不对的。
    我希望shentj不是少女,不然险些酿成大祸。哈
      

  4.   

    lanbor(兰波) ,我当然不是少女;)
    谢谢几位
      

  5.   

    办法:
    window.showModalDialog("xxx.htm")xx.htm
    ====================
    <frameset rows="0,*">
    <frame src="about:blank">
    <frame src="xxx.asp">
    </frameset>xxx.asp
    =========
    <form target="_self" method=post>以下是测试文件:
    index.htm
    =====================
    <input onclick='window.showModalDialog("f.htm")' type=button  value="打开">
    f.htm
    =================================
    <frameset rows="0,*">
    <frame src="about:blank">
    <frame src="a.asp">
    </frameset>
    a.asp
    ===============
    <script>
    function test(o)
    {
    if(o.txt.value=="")
    {
    alert("不能为空")
    return false
    }
    return true
    }
    </script>
    <form method=post onsubmit="return test(this)" action="a.asp">
    <input name=txt>
    <input type=submit>
    </form><%
    Response.write "你输入的数据:" & Request.form("txt")
    %>
      

  6.   

    对于这个问题,先看看这个函数的构造:
    模式对话框:showModalDialog
    vReturnValue = window.showModalDialog(sURL[, vArguments][, sFeatures]);非模式对话框:showModelessDialog() (Internet Explorer 5 和以上版本)参数说明:
    ·vReturnValue:对于showModalDialog(),它表示被打开的对话框窗口设置的returnValue属性值。对于showModelessDialog(),它表示新窗口对象。
    显然模式返回不了弹出的对话框对象,所以上述的方法都不可行,不知道楼上的各位发布的代码都试验过了没有。人家明显是问,如何在模式对话框中指向一个新的页面,而不是弹出新的页面。
      

  7.   

    在你弹出的对话框的<Head></Head>之间加上
    一句<base target="_parent">