哎,不知叫什么标题好,和html:frame有关的

nick008 2004-08-27 02:09:38
我要实现以下功能:

左侧显示要用户指定的查询条件(html:text,html:select等),此时这个页面右侧什么都没有,
用户点击查询按钮后,结果显示在右侧,左侧保持用户指定的查询条件不变。

哎,一点思路都没有?哪位高手指点一下怎么实现,设计几个页面,怎么mapping呀?另外再讲讲html:frame怎么用。

先谢了
...全文
154 点赞 收藏 9
写回复
9 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
Tangel0904 2004-09-08
index.htm中分为两个frame,左边放查询条件,为select.htm,在里面将查询语句用什么text,呀fields呀组织好为s吧!然后在最后用parent.query.document.location="http://host/..../query?key=s"
右边放结果,frame name 为query。
在query.class为一个servlet,读取key参数查询,结果用out.println("<html>......");
返回就直接到你右边的frame里了!
回复
tangbow 2004-09-08
<%@ page contentType="text/html; charset=Shift_JIS" pageEncoding="Shift_JIS" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ page import ="jp.co.sg.common.constant.Global" %>
<%
String userType = "";
String MiddlePart = ""; //main part of page
String LeftTopPart = ""; //top menu part of page
String LeftBottonPart = ""; //common menu of page

LeftBottonPart = "../menu/bottom.jsp";
userType = (String) session.getAttribute(Global.LOGIN_TYPE);

if (userType.equals(Global.APPLYER_GROUP)) {
MiddlePart = "BusinessInputDsp.do";
LeftTopPart = "../../business/requestUser/menuTop.jsp";
}
else if (userType.equals(Global.LEADER_GROUP)) {
MiddlePart = "BusinessLeaderSearchDisplay.do";
LeftTopPart = "../../business/requestLeader/menuTop.jsp";
}
else if (userType.equals(Global.WORKER_GROUP)) {
MiddlePart = "WorkerSearchDisplay.do";
LeftTopPart = "../../business/requestWorker/menuTop.jsp";
}
else if (userType.equals(Global.MANAGER_GROUP)) {
MiddlePart = "AuthorityHead.do"; //temp ,not defined
LeftTopPart = "../../manage/common/menuTop.jsp";
}

%>
<HTML>
<HEAD>
<html:base/>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=Shift_JIS">
<TITLE>SG?X?WebVXe</TITLE>
</HEAD>

<FRAMESET COLS="190,*" BORDER=1 FRAMEBORDER=1 FRAMESPACING=1>
<FRAMESET ROWS="70%,*">
<FRAME SRC="<%= LeftTopPart %>" NAME="TOP">
<FRAME SRC="<%= LeftBottonPart %>" NAME="BOTTOM" >
</FRAMESET>

<FRAME SRC="<%= request.getContextPath() %>/<%= MiddlePart %>" NAME="MAIN">
</FRAMESET>
</HTML>
回复
thetm 2004-09-08
struts无非是对原有结构的调整,最终的表现结果还是frame吧,只是中间绕几个弯。
回复
heartofsword 2004-08-30
用Macromedia Dreamweaver画个frame分成左右两边 查询按钮刷新右边frame
回复
nick008 2004-08-30
查了一天的资料,发现好像有人说我要的这个功能,没法用html:frame标签实现,而应该用tiles,有没有人搞过这个呀,指点一下吧
回复
nick008 2004-08-28
楼上的大大你三角蛮多的吗,这个问题你来给个答案吧
回复
朋友别哭 2004-08-27
up
回复
nick008 2004-08-27
楼上的大大很感谢你的回复,可我要的是struts下的jsp呀
回复
梦里饭香 2004-08-27
首页:Default.html
<html>
<title>左右框架测试</title>
<link REL="SHORTCUT ICON" href="images/ybb.ico">
<meta http-equiv="Content-Type" content="text/html;charset=gb2312">

<style type="text/css">
.navPoint {COLOR: white; CURSOR: hand; FONT-FAMILY: Webdings; FONT-SIZE: 9pt}
</style>
<body style="MARGIN: 0px" scroll=no>

<table border="0" cellPadding="0" cellSpacing="0" height="100%" width="100%">
<tr>
<td align="middle" id="frmTitle" noWrap vAlign="center" name="frmTitle">


<iframe frameBorder="0" id="carnoc" name="carnoc" scrolling="yes" src="left.html" style="HEIGHT: 100%; VISIBILITY: inherit; WIDTH: 170px; Z-INDEX: 2">
</iframe>



</td>
<td class=a2 style="WIDTH: 12pt">
<table border="0" cellPadding="0" cellSpacing="0" height="100%">
<tr>
<td style="HEIGHT: 100%" onclick="switchSysBar()">
<font style="FONT-SIZE: 9pt; CURSOR: default; COLOR: #ffffff">
<br>
<br>屏幕切换
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<span class="navPoint" id="switchPoint" title="关闭/打开左栏">3</span><br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
屏幕切换 </font></td>
</tr>
</table>
</td>
<td style="WIDTH: 100%">
<iframe frameBorder="0" id="main" name="main" scrolling="yes" src="main.html" style="HEIGHT: 100%; VISIBILITY: inherit; WIDTH: 100%; Z-INDEX: 1">
</iframe></td>
</tr>
</table>
<script>if (window.screen.width<'1024'){switchSysBar()}</script>
</html>

左侧页:left.html
<HTML>
<HEAD>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<STYLE type=text/css>
BODY {
BACKGROUND: #799ae1; MARGIN: 0px; FONT: 9pt 宋体
SCROLLBAR-HIGHLIGHT-COLOR:#99A5F2;
SCROLLBAR-SHADOW-COLOR:#99A5F2;
SCROLLBAR-3DLIGHT-COLOR:#99A5F2;
SCROLLBAR-TRACK-COLOR:#99A5F2;
SCROLLBAR-DARKSHADOW-COLOR:#99A5F2;
}
TABLE {
BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px
}
TD {
FONT: 12px 宋体
}
IMG {
BORDER-RIGHT: 0px; BORDER-TOP: 0px; VERTICAL-ALIGN: bottom; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px
}
A {
FONT: 12px 宋体; COLOR: #000000; TEXT-DECORATION: none
}
A:hover {
COLOR: #428eff; TEXT-DECORATION: underline
}
.sec_menu {
BORDER-RIGHT: white 1px solid; BACKGROUND: #d6dff7; OVERFLOW: hidden; BORDER-LEFT: white 1px solid; BORDER-BOTTOM: white 1px solid
}
.menu_title {

}
.menu_title SPAN {
FONT-WEIGHT: bold; LEFT: 8px; COLOR: #215dc6; POSITION: relative; TOP: 2px
}
.menu_title2 {

}
.menu_title2 SPAN {
FONT-WEIGHT: bold; LEFT: 8px; COLOR: #428eff; POSITION: relative; TOP: 2px
}
</STYLE>

</HEAD>
<FORM METHOD=POST ACTION="sel_asp.asp" target="yuzi_frame">

<input type="text" name="sel_value">
<input type="submit" name="Submit" value="提交">

</FORM>
<center>
<TBODY>
<TR>
<TD vAlign=top> 
<td width=100% valign=top height=100%>
<br>
  </TR></TBODY></center><iframe HEIGHT="0" WIDTH="0" NAME="hiddenframe"></iframe>  
</BODY>

右边:main.html
<html><frameset name="main_frame" rows="*,0" frameborder="0">
<frame name="yuzi_frame" src="">
<frame src="#"></frameset></html>

sel_asp.asp
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
</HEAD>

<BODY>
结果!
</BODY>
</HTML>
回复
相关推荐
发帖
Web 开发
创建于2007-09-28

8.0w+

社区成员

Java Web 开发
申请成为版主
帖子事件
创建了帖子
2004-08-27 02:09
社区公告
暂无公告