需要得到的效果是
当我们在输入培训日期或者培训类别或培训截止日期后,在下面的iframe中显示查询的信息。如何跳转,不知道改如何修改。麻烦各位解答。谢谢了。
采用struts框架。
页面请求页面
<body scroll ="yes">
<table style="padding-top: 3px">
<tr>
<td colspan="3" class="position">您的当前位置: </td>
</tr>
</table> <form name="myform" id="myform" action="${base}/searchPx.do" target="_self" method="post" onsubmit="return validate();">
培训类别<input class="field" name="pxlbmean" ondblclick="openPxCodeWindow()" id="meanInput" ><input type="hidden" name="pxlb" id="codeInput" />
起始日期
<input type="text" class="field" name="sdate"/>
截止日期
<input type="text" class="field" name="edate"/>
<input type="submit" value="" class="searchButton" />
</form>
<iframe src="${base}/viewpx.do" width="700" height="400">
</iframe>
action类 public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { SubUser user = (SubUser) request.getSession().getAttribute("user");
ITrainService trs = (ITrainService) Container.getInstance(ITrainService.class);
List list = trs.searchTrainByPxlb(request.getParameter("pxlb"), request.getParameter("sdate"), request.getParameter("edate"), user);
request.setAttribute("list", list);
// return mapping.findForward("success");
return new ActionForward("/jdcx/searchpx.jsp"); }配置文件 <action path="/searchPx" type="com.hykj.ms.action.search.SearchTrain">
<forward name="success" path="/jdcx/train/viewpx.jsp" />
</action>
<action path="/viewpx" forward="/jdcx/train/viewpx.jsp"/>显示页面 <table border="0" cellpadding="0" cellspacing="0" > <tr><td class="tableLeftUpAngle"></td><td class="tableUp"></td><td class="tableRightUpAngle"></td></tr>
<tr><td class="tableLeft"></td><td> <table class="shadowTable" cellpadding="0" cellspacing="0" >
<tr>
<th>姓名</th>
<th>培训类别</th>
<th>起始日期</th>
<th>截止日期</th>
<th>培训完成情况</th> </tr> <c:forEach varStatus="sta" var="item" items="${list}" >
<c:if test="${sta.index>0}" >
<tr>
<td>${item[0]}</td>
<td>${myfun:getMean(item[1],'zb29_pxlb')}</td>
<td>${item[2]}</td>
<td>${item[3]}</td>
<td>${myfun:getMean(item[4],'zb28_xxwc')}</td>
</tr>
</c:if>
</c:forEach> </table>
</td><td class="tableRight"></td></tr>
<tr><td class="tableLeftBottomAngle"></td><td class="tableBottom"></td><td class="tableRightBottomAngle"></td></tr> </table>
当我们在输入培训日期或者培训类别或培训截止日期后,在下面的iframe中显示查询的信息。如何跳转,不知道改如何修改。麻烦各位解答。谢谢了。
采用struts框架。
页面请求页面
<body scroll ="yes">
<table style="padding-top: 3px">
<tr>
<td colspan="3" class="position">您的当前位置: </td>
</tr>
</table> <form name="myform" id="myform" action="${base}/searchPx.do" target="_self" method="post" onsubmit="return validate();">
培训类别<input class="field" name="pxlbmean" ondblclick="openPxCodeWindow()" id="meanInput" ><input type="hidden" name="pxlb" id="codeInput" />
起始日期
<input type="text" class="field" name="sdate"/>
截止日期
<input type="text" class="field" name="edate"/>
<input type="submit" value="" class="searchButton" />
</form>
<iframe src="${base}/viewpx.do" width="700" height="400">
</iframe>
action类 public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { SubUser user = (SubUser) request.getSession().getAttribute("user");
ITrainService trs = (ITrainService) Container.getInstance(ITrainService.class);
List list = trs.searchTrainByPxlb(request.getParameter("pxlb"), request.getParameter("sdate"), request.getParameter("edate"), user);
request.setAttribute("list", list);
// return mapping.findForward("success");
return new ActionForward("/jdcx/searchpx.jsp"); }配置文件 <action path="/searchPx" type="com.hykj.ms.action.search.SearchTrain">
<forward name="success" path="/jdcx/train/viewpx.jsp" />
</action>
<action path="/viewpx" forward="/jdcx/train/viewpx.jsp"/>显示页面 <table border="0" cellpadding="0" cellspacing="0" > <tr><td class="tableLeftUpAngle"></td><td class="tableUp"></td><td class="tableRightUpAngle"></td></tr>
<tr><td class="tableLeft"></td><td> <table class="shadowTable" cellpadding="0" cellspacing="0" >
<tr>
<th>姓名</th>
<th>培训类别</th>
<th>起始日期</th>
<th>截止日期</th>
<th>培训完成情况</th> </tr> <c:forEach varStatus="sta" var="item" items="${list}" >
<c:if test="${sta.index>0}" >
<tr>
<td>${item[0]}</td>
<td>${myfun:getMean(item[1],'zb29_pxlb')}</td>
<td>${item[2]}</td>
<td>${item[3]}</td>
<td>${myfun:getMean(item[4],'zb28_xxwc')}</td>
</tr>
</c:if>
</c:forEach> </table>
</td><td class="tableRight"></td></tr>
<tr><td class="tableLeftBottomAngle"></td><td class="tableBottom"></td><td class="tableRightBottomAngle"></td></tr> </table>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货