情况是这样的,我的一个项目,有两个文件夹,Maintenance和Enquiry。在Maintenance下,我有一个页面SWProvide.aspx,在这个页面中写了一个脚本函数,打开一个页面BrowseSoftware.aspx,代码如下:
    <script language="JavaScript" type="text/JavaScript">
        function BrowseSoftware() {
            var return_Value = window.showModalDialog("BrowseSoftware.aspx", window, "dialogWidth:900px;dialogHeight:450px;center:yes;status:no;scroll:yes;help:no;");            document.getElementById('<%=hfReturnValue.ClientID%>').value = return_Value;            document.getElementById("ibBrowseSW").click();
        }
    </script>SWProvide.aspx和BrowseSoftware.aspx在同一文件夹,这是没有问题的。现在Enquiry文件夹下也有一个页面需要调用BrowseSoftware.aspx,我在写脚本函数时,总报找不到页面,代码如下:
    <script language="JavaScript" type="text/JavaScript">
        function BrowseSoftware() {
            var return_Value = window.showModalDialog("~/Maintenance/BrowseSoftware.aspx", window, "dialogWidth:900px;dialogHeight:450px;center:yes;status:no;scroll:yes;help:no;");            document.getElementById('<%=hfReturnValue.ClientID%>').value = return_Value;            document.getElementById("ibBrowseSW").click();
        }
    </script>
不管我在BrowseSoftware.aspx加什么地址位,总是说找不到Enquiry下的什么什么BrowseSoftware.aspx请问高手,我应该怎么写才能调用到Maintenance下的BrowseSoftware.aspx

解决方案 »

  1.   

    ~/Maintenance/BrowseSoftware.aspx
    路径有问题 检查下~
      

  2.   

    各种符号都试试···“.. || ~”
    实在不行,就先把本机正确的路径写上去,试下看能打开不
    如果能的话,而且上面的方法不行,就用后台拼一个URL过来把··
      

  3.   

    我发现一个特点,不管我怎么写路径,在运行的时候,报的地址错误,总是在我写的地址前加上了
    Enquiry/请问该怎么解决?