外层的代码<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/webacd.tld" prefix="webacd" %>
<%@ page language="java" %>
<bean:parameter id="formObj" name="formObj" value=""/>
<bean:define id="ACDSelectAgentForm" name="ACDSelectAgentForm" type="com.webex.webapp.webacd.action.preferences.ACDSelectAgentForm"/>
<script language=javascript>
function DoAction(Action,Index)
{
switch(Action)
{
case "Index":
document.agentdetails.ACDSelectAgentForm.AT.value = "Index";
document.agentdetails.ACDSelectAgentForm.index.value = Index;
document.agentdetails.ACDSelectAgentForm.submit();
break;
case "Search":
var SearchSrting=document.forms[0].searchTopic.value;
if(SearchSrting.length==0)
return false;
document.agentdetails.ACDSelectAgentForm.AT.value = "Search";
document.agentdetails.ACDSelectAgentForm.searchTopic.value = SearchSrting;
document.agentdetails.ACDSelectAgentForm.submit(); return true;
break;
}}</script><html:html locale="true">
<html:base/>
<head>
<link rel="stylesheet" href='<%= request.getContextPath()+"/webacd/html/css/webacdbrand.css" %>' type="text/css">
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<title><bean:message key="webacd.preferences.title"/></title>
</head><body>
<html:form action="/agentlist">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td class="title1"><bean:message key="webacd.preferences.title"/></td>
</tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr> <td width="96%" height="45">
<html:text property="searchTopic" />
<input type="button" name="search" value='<bean:message key="webacd.preferences.button.search"/>' onclick="DoAction('Search','')">
</td>
</tr>
<tr>
<td colspan=2>
<html:hidden property="index" />
</td>
</tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="2%" valign="top">
<table width="17" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="17" align="center" bgcolor="#EEEEEE" class="addressbookalphabet">
<webacd:AgentList action="letter" index="<%=ACDSelectAgentForm.getIndex()%>"/>
</td>
</tr>
</table>
</td>
<td width="1%"> </td>
<td width="97%" valign="top"><iframe id="agentdetails" name="agents" height="380" width="98%" src="/webacd/listagent.do" frameborder="1" scrolling="auto"></iframe>
<table width="98%" cellspacing="4">
<tr>
<td align="right"> <html:button property="cancel" onclick="window.close()"><bean:message key="webacd.preferences.button.cancel"/></html:button>
</td>
</tr>
</table>
</td>
</tr>
</table>
</html:form>
</body>
</html:html>iframe 里面的代码
<%--
- @(#) userlist.jsp
- Description: List user details in the site
- Copyright: Copyright (C) 2004 All rights reserved
- Company: WebEx Communications Inc.
- Author(s): Vicent Wang <[email protected]>
--%><%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/webacd.tld" prefix="webacd" %>
<%@ page language="java" %>
<bean:define id="ACDSelectAgentForm" name="ACDSelectAgentForm" type="com.webex.webapp.webacd.action.preferences.ACDSelectAgentForm"/>
<script language="javascript" src='<%=request.getContextPath()+"/webacd/html/js/string.js"%>'></script>
<script language=javascript>
function getUserEmail()
{
var strMatrix="";
len =document.form.elements.length; for(var i=0; i < len; i++)
{
if(form.elements[i].type=="checkbox"&&form.elements[i].checked)
strMatrix+=document.forms[0].elements[i].value+";";
}
return strMatrix;
}
</script><html:html locale="true">
<head><html:base/>
<link rel="stylesheet" href='<%= request.getContextPath()+"/webacd/html/css/webacdbrand.css" %>' type="text/css">
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<title><bean:message key="webacd.preferences.title"/></title>
</head><body>
<html:form action="/listagent">
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="tabTable">
<tr>
<tr height=22 class="tabTable">
<html:hidden name="ACDSelectAgentForm" property="searchTopic"/>
<html:hidden name="ACDSelectAgentForm" property="AT"/>
<html:hidden name="ACDSelectAgentForm" property="index"/>
<td nowrap WIDTH=3% ALIGN="LEFT" valign="bottom" class="title5">
</td>
<td nowrap WIDTH=30% ALIGN="LEFT" valign="bottom" class="title5">
<bean:message key="webacd.preferences.name"/>
</td>
<td nowrap WIDTH=37% ALIGN="LEFT" valign="bottom" class="title5">
<bean:message key="webacd.preferences.email"/>
</td>
<td nowrap WIDTH=30% ALIGN="LEFT" valign="bottom" class="title5">
<bean:message key="webacd.preferences.username"/>
</tr> <logic:iterate id="user" name="ACDSelectAgentForm" property="agentList" type="com.webex.webapp.common.vo.user.User">
<tr>
<td width="30" class="row1"><span class="row2">
<input type="checkbox" name="email" value="<bean:write name="user" property="email"/>" ></span></td>
<td nowrap class="row1"><bean:write name="user" property="firstName"/> <bean:write name="user" property="lastName"/> </td>
<td class="row1"><bean:write name="user" property="email"/> </td>
<td class="row1"><bean:write name="user" property="userName"/> </td>
</tr>
</logic:iterate> </table>
</html:form>
</body>
</html:html>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/webacd.tld" prefix="webacd" %>
<%@ page language="java" %>
<bean:parameter id="formObj" name="formObj" value=""/>
<bean:define id="ACDSelectAgentForm" name="ACDSelectAgentForm" type="com.webex.webapp.webacd.action.preferences.ACDSelectAgentForm"/>
<script language=javascript>
function DoAction(Action,Index)
{
switch(Action)
{
case "Index":
document.agentdetails.ACDSelectAgentForm.AT.value = "Index";
document.agentdetails.ACDSelectAgentForm.index.value = Index;
document.agentdetails.ACDSelectAgentForm.submit();
break;
case "Search":
var SearchSrting=document.forms[0].searchTopic.value;
if(SearchSrting.length==0)
return false;
document.agentdetails.ACDSelectAgentForm.AT.value = "Search";
document.agentdetails.ACDSelectAgentForm.searchTopic.value = SearchSrting;
document.agentdetails.ACDSelectAgentForm.submit(); return true;
break;
}}</script><html:html locale="true">
<html:base/>
<head>
<link rel="stylesheet" href='<%= request.getContextPath()+"/webacd/html/css/webacdbrand.css" %>' type="text/css">
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<title><bean:message key="webacd.preferences.title"/></title>
</head><body>
<html:form action="/agentlist">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td class="title1"><bean:message key="webacd.preferences.title"/></td>
</tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr> <td width="96%" height="45">
<html:text property="searchTopic" />
<input type="button" name="search" value='<bean:message key="webacd.preferences.button.search"/>' onclick="DoAction('Search','')">
</td>
</tr>
<tr>
<td colspan=2>
<html:hidden property="index" />
</td>
</tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="2%" valign="top">
<table width="17" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="17" align="center" bgcolor="#EEEEEE" class="addressbookalphabet">
<webacd:AgentList action="letter" index="<%=ACDSelectAgentForm.getIndex()%>"/>
</td>
</tr>
</table>
</td>
<td width="1%"> </td>
<td width="97%" valign="top"><iframe id="agentdetails" name="agents" height="380" width="98%" src="/webacd/listagent.do" frameborder="1" scrolling="auto"></iframe>
<table width="98%" cellspacing="4">
<tr>
<td align="right"> <html:button property="cancel" onclick="window.close()"><bean:message key="webacd.preferences.button.cancel"/></html:button>
</td>
</tr>
</table>
</td>
</tr>
</table>
</html:form>
</body>
</html:html>iframe 里面的代码
<%--
- @(#) userlist.jsp
- Description: List user details in the site
- Copyright: Copyright (C) 2004 All rights reserved
- Company: WebEx Communications Inc.
- Author(s): Vicent Wang <[email protected]>
--%><%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/webacd.tld" prefix="webacd" %>
<%@ page language="java" %>
<bean:define id="ACDSelectAgentForm" name="ACDSelectAgentForm" type="com.webex.webapp.webacd.action.preferences.ACDSelectAgentForm"/>
<script language="javascript" src='<%=request.getContextPath()+"/webacd/html/js/string.js"%>'></script>
<script language=javascript>
function getUserEmail()
{
var strMatrix="";
len =document.form.elements.length; for(var i=0; i < len; i++)
{
if(form.elements[i].type=="checkbox"&&form.elements[i].checked)
strMatrix+=document.forms[0].elements[i].value+";";
}
return strMatrix;
}
</script><html:html locale="true">
<head><html:base/>
<link rel="stylesheet" href='<%= request.getContextPath()+"/webacd/html/css/webacdbrand.css" %>' type="text/css">
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<title><bean:message key="webacd.preferences.title"/></title>
</head><body>
<html:form action="/listagent">
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="tabTable">
<tr>
<tr height=22 class="tabTable">
<html:hidden name="ACDSelectAgentForm" property="searchTopic"/>
<html:hidden name="ACDSelectAgentForm" property="AT"/>
<html:hidden name="ACDSelectAgentForm" property="index"/>
<td nowrap WIDTH=3% ALIGN="LEFT" valign="bottom" class="title5">
</td>
<td nowrap WIDTH=30% ALIGN="LEFT" valign="bottom" class="title5">
<bean:message key="webacd.preferences.name"/>
</td>
<td nowrap WIDTH=37% ALIGN="LEFT" valign="bottom" class="title5">
<bean:message key="webacd.preferences.email"/>
</td>
<td nowrap WIDTH=30% ALIGN="LEFT" valign="bottom" class="title5">
<bean:message key="webacd.preferences.username"/>
</tr> <logic:iterate id="user" name="ACDSelectAgentForm" property="agentList" type="com.webex.webapp.common.vo.user.User">
<tr>
<td width="30" class="row1"><span class="row2">
<input type="checkbox" name="email" value="<bean:write name="user" property="email"/>" ></span></td>
<td nowrap class="row1"><bean:write name="user" property="firstName"/> <bean:write name="user" property="lastName"/> </td>
<td class="row1"><bean:write name="user" property="email"/> </td>
<td class="row1"><bean:write name="user" property="userName"/> </td>
</tr>
</logic:iterate> </table>
</html:form>
</body>
</html:html>
解决方案 »
- 求ext-GWT页面框架源码,就像http://examples.ext.net/的一样
- JSP中if语句嵌套的奇怪结果,谁能解释下
- Miplatform知道的进来一下
- 能不能把javascript中的变量在网页中文本框中读取出来
- 有关tomcat的一个基础问题,为什么更新class文件后,有时需要重启tomcat,有时不重启却也有效
- JTDS 链接数据库的问题!!抛出错误
- 请问哪里有利用JSP上传图片的原代码下载
- 谁能给我一个j2sdkee1.3.1的下载地址
- 问题,问题,各位老大帮我看看
- 如何取得服务器的时间
- 网页弹出文件下载还是打开对话框问题
- ----Web应用中怎么判断会员是否已经离开??---
{
switch(Action)
{
case "Index":
document.agentdetails.AT.value = "Index";
document.agentdetails.index.value = Index;
document.agentdetails.submit();
break;
case "Search":
var SearchSrting=document.forms[0].searchTopic.value;
if(SearchSrting.length==0)
return false;
document.agentdetails.AT.value = "Search";
document.agentdetails.searchTopic.value = SearchSrting;
document.agentdetails.submit(); return true;
break;
}}
<html:hidden name="ACDSelectAgentForm" property="AT"/>
修改成显示,不要hidden,看看onclick="DoAction('Search','')以后AT显示的数值是不是你想要的
--------------------------------------------------------------------------------
/webacd/jsp/preferences/agent_list.jsp(56): The TLD description for tag 'write' requires that the body be empty.
probably occurred due to an error in /webacd/jsp/preferences/agent_list.jsp line 56:
<bean:write name="ACDSelectAgentForm" property = "AT">
--------------------------------------------------------------------------------
Mon Jul 12 14:03:36 CST 2004
报的错误
document.agentdetails.ACDSelectAgentForm.AT.value = "Index";
document.agentdetails.ACDSelectAgentForm.index.value = Index;
document.agentdetails.ACDSelectAgentForm.submit();
中的ACDSelectAgentForm可能是错误的。
那个位置的名称应该是iframe中<html:form action="/listagent">在客户端所生成的名称。