小小的question

lmh7607 2002-06-07 02:23:02
使用response.sendRedirect("../html/checkBill_id.htm");时,
才能象window.open("../html/checkBill_id.htm",23,45,"v");
指定大小,指定目标呢?
如果不行,有沒有其他办法?

TKS all!

1:
我想可以这样
先用window.open("jump.jsp?rep=checkBill_id",23,45,"v")
然后在jump.jsp中加入代码
String relocation="../html/"+request.getParameter("rep")+".htm";
response.sendRedirect(relocation);

2:
thanks!!
你这方法估计不行。因为我是在servlet当中
response.sendRedirect(relocation)
3:
为什么不能用:
window.open("../html/checkBill_id.htm",23,45,"v");

4:
在serverlet中将路径付给一个变量,在页面中
window.open(<%=变量名%>,.....)

5:
jiangqi能否讲具体点。
TKS!

6:
answer Andrawu:
因为一边是client.
一边是server.
7:
既然是在servlet中,就应:
PrintWriter out = response.getWriter();
String sPath = "../html/checkBill_id.htm" ;
out.print(<script>) ;
out.print("window.open("+sPath+",\"\",\"\");") ;
out.print(</script>) ;
8:
andrawu:
Thanks!
你这方法行不通呀。
我是在一个jsp page中调用servlet.
if 单据号重复,then other page show error!
但是,jsp Page上输入的数据要保留。
if 单据号正确,then 保存数据,继续显示增加的页面 。
...全文
32 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
zijianyi 2002-06-07
  • 打赏
  • 举报
回复
为什么必须用response.sendRedirect呢?

81,092

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧