在父页面用showModalDialog 打开一个子页面,当关闭这个子页面时系统自动跳转到项目根目录下,而不是父页面。这是怎么回事?
这是代码:
var returnvalue; var url; 
url="../Shuiwu/GradeItemEdit.aspx?ItemID="+ItemID;
window.showModalDialog('alledit.htm',url,'dialogHeight:500px;dialogWidth:900px;center:yes;status:0;help:0;edge:raised');

解决方案 »

  1.   

    大师们帮帮忙,在线等>>>>
      

  2.   

    你的怎么有两个url?我个人认为尽量少用模式窗口,模式窗口弹出的网页始终有焦点,只有关闭子窗口才能操作父窗口,这样不能满足某些功能,用非模式窗口或者用层。
    window.showModalDialog(url,'','dialogHeight:500px;dialogWidth:900px;center:yes;status:0;help:0;edge:raised'); 
     
     
     
      

  3.   

    //中间页打开方式
    function OpenWindowWithFresh(frameUrl(中间页Url),freshUrl(刷新页面url),url(打开也页面url),dialogWidth,dialogHeight) 

    var returnvalue;
    returnvalue=window.showModalDialog(frameUrl,url,'dialogHeight:' + dialogHeight + 'px;dialogWidth:' + dialogWidth + 'px;center:yes;Scroll:no;status:0;help:0;edge:raised'); 
    document.location.href=freshUrl;
    }
    //无需中间页即可打开的模式窗体function OpenModelInfo(freshUrl,url,dialogHeight,dialogWidth) 

     
    returnvalue=window.showModalDialog(url,window,'dialogHeight:'+dialogHeight+'px;dialogWidth:'+dialogWidth+'px;center:yes;status:0;help:0;edge:raised')  
    document.location.href=freshUrl; 
    }