response.redirect "../"&path&"/"&filename  ////这里如何在新窗口中显示?
%>
==>
%>
<script>window.open("../<%=path%>/<%=filename%>","");</script>

解决方案 »

  1.   

    谢谢楼上的帮忙,是不是将response.redirect "../"&path&"/"&filename  改为<script>window.open("../<%=path%>/<%=filename%>","");</script>
    我这样做了后,是在新窗口中显示内容了,但原网页内容了一个大空白上一个“%〉”
      

  2.   

    ……
    rs.close
    conn.close
    %>
    <script>window.open("../<%=path%>/<%=filename%>","","");</script>注意不要把%>写到<script>标签后面
      

  3.   

    楼上的你好,我开始时是把%〉写到<script>标签后面了,我已经改了,但其父窗口的地址变了,显示成空白窗口,代码如下,谢谢!<%@ LANGUAGE="VBSCRIPT"%>
    <!--#include file="articleconn.asp"-->
    <%response.buffer=false
    dim sql
    dim path
    dim filename
    dim rs
    dim listname
    dim articleidarticleid=request("id")
    path=request("path")
    session("path1")=path
    filename=request("filename")
    set rs=server.createobject("adodb.recordset")
    sql="update article set hits=hits+1 where newsID="&articleid
    rs.open sql,conn,1,1   
    rs.close
    conn.close
    %>
    <script>window.open("../<%=path%>/<%=filename%>","");</script>
      

  4.   

    你最开始写的asp文件不变,把上个页面写成
    <a href="javascript:void(0)" onclick="window.open('redirect.asp','','')">open</a>
      

  5.   

    上个页面的代码如下文件名为news.asp,上次发的代码文件名为open.asp,但下面的代码不能改,哪怕是加个空格,也不能正常运行,窗口中的文件名都没有了,不知道为什么?谢谢帮忙!<head>
    <style>A.menu2{text-decoration: none;color:#000099;line-height: 25pt;font-size:9pt} A.menu2:hover {text-decoration: none;line-height: 25pt;font-size:9pt;color: #ffffff}A.menu2:visited {color:#FF66cFF;line-height: 25pt;font-size:9pt}</style>
    </head>javastr="" 
    javastr=javastr+"<table width=\"100%\" border=\"0\">"
    <!--#include file="articleconn.asp"-->
    <%newstype=request("typeid")
    n=request("n")
    if newstype<> "" then
    sql="select  * from article where shenghe=1 and typeid="+cstr(newstype)+" order by dateandtime desc"
    set rs=conn.execute(sql)%>
    <% 
    do while not rs.eof 
    %>
    javastr=javastr+"<tr><td>" 
    javastr=javastr+"<font color=\"#597BC3\" size=\"1\">.</font><span style=\"font-size:9pt;line-height: 15pt\"><%if rs("selectpic") = 1 then%>[图文]<%end if%><a href=\"open.asp?id=<%=rs("newsid")%>&path=<%=rs("path")%>&filename=<%=rs("N_Fname")%>\") ><%=rs("title")%></span></a><font color=\"#999999\" font size=\"1\">(<%=rs("dateandtime")%>)(阅读:<%=rs("hits")%>)</font>" 
    javastr=javastr+"</td></tr>"
    <%n=n-1
    if n<1 then exit do
    rs.movenext 
    loop
    rs.close   
    set rs=nothing   
    conn.close   
    set conn=nothing%> 
    javastr=javastr+"</table>"  
    document.write (javastr)  
    <%else%>
    document.write ("对不起,暂时没有任何内容。") 
    <%end if%>
      

  6.   

    把你的代码改了一下,测试通过news.asp
    <%
    dim newsid
    dim path
    dim N_Fname
    dim title
    newsid="news18"
    path="sub"
    N_Fname="welcome.htm"
    title="open"
    %>
    <script>
    javastr=""; 
    //javastr=javastr+"<a href=\"open.asp?id=<%=newsid%>&path=<%=path%>&filename=<%=N_Fname%>\"><%=title%></a>";//这是你原来的代码
    javastr=javastr+"<a href=\"javascript:void(0)\" onclick=\"window.open('open.asp?id=<%=newsid%>&path=<%=path%>&filename=<%=N_Fname%>','','')\"><%=title%></a>";//改成这样
    document.write(javastr);
    </script>  open.asp
    <%response.buffer=false
    dim sql
    dim path
    dim filename
    dim rs
    dim listname
    dim articleidarticleid=request("id")
    path=request("path")
    filename=request("filename")
    response.redirect "../"&path&"/"&filename  
    %>