没有太明白你的意思。
不过showModalDialog 的窗口确实不能在自身打开一个新的窗口。有时候问题解决不了,应该想想,是不是解决问题的思路不对。不好意思,帮不了你,只能说说我的想法

解决方案 »

  1.   

    方法1:
    在b.htm的head里加上这句:
    <base target="_self"/>方法2:
    在这个页面的外面套一个iframe
    a.htm:
    --------------------------
    functoin testFun()
    {
      var DialogArgument=new Array();
      DialogArgument["src"]=homeUrl+"b.htm";
      DialogArgument["title"]="b.htmTitle";
      var a=showModalDialog("DialogFrame.htm",DialogArgument,"status:no;resizable:no;help:no;dialogHeight:350px;dialogWidth:600px;");
      alert("return value is "+a);
    }
    DialogFrame.htm
    --------------------------
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=GB2312">
    <script language=javascript> var DialogArgument=window.dialogArguments;
    if (DialogArgument!=null) document.write("<title>"+DialogArgument.title+"</title>");
    else document.write("<title>Dialog</title>");
    </script>
    <title>Dialog</title>
    </head><body leftMargin=0 rightMargin=0 topMargin=0 bottomMargin=0 onload="initFun();"> 
    <iframe width=100% height=100% id=dialogIframe></iframe>
    </body></html>
    <script language=javascript>function initFun()
    { if (DialogArgument!=null) document.all.dialogIframe.src=DialogArgument.src;
    else alert('Sorry! Perhaps you are use this page wrongly');
    }
    </script>
    b.htm;c.htm
    --------------------------
    function OkFun()
    {
    top.returnValue="OK";
    top.close();}