<%@ include file="/common/taglibs.jsp"%>
<title><fmt:message key="menu.admin" />-><fmt:message key="menu.admin.departmentsManager" /></title>
<link rel="stylesheet" type="text/css" media="all" href="<c:url value='/styles/default.css'/>" />
<link rel="stylesheet" type="text/css" media="all" href="<c:url value='/styles/helptip.css'/>" />
<link rel="stylesheet" type="text/css" media="print" href="<c:url value='/styles/print.css'/>" />
<c:if test="${not empty errorReason}">
<div align="center" style="color: red">
<c:if test="${errorReason=='updateConstraint'}">
<fmt:message key="tcsBox.updateConstraint"/>
</c:if>
<c:if test="${errorReason=='addConstraint'}">
<fmt:message key="tcsBox.addConstraint"/>
</c:if>
</div>
</c:if>
<html:form action="editBoxes.html?method=finishEdit" styleId="TcsboxForm" >
<table class="detail" valign="top">
<c:if test="${from == 'update' or param.handle =='update'}">
<input type="hidden" value="update" name="handle"/>
</c:if >
<c:if test="${from == 'add'}">
<input type="hidden" value="add" name="handle"/>
</c:if >
<!-- <c:set var="pageButtons">
<tr>
<td height="50"></td>
<td class="buttonBar">
<c:if test="${from == 'update'}">
<input type="submit" value='<fmt:message key="button.submit"/>' class="button" />
<input type="hidden" value="update" name="handle"/>
</c:if >
<c:if test="${from == 'add'}">
<input type="submit" value='<fmt:message key="button.submit"/>' class="button" />
<input type="hidden" value="add" name="handle"/>
</c:if >
<input type="reset" value='<fmt:message key="button.reset"/>' class="button"/>
<input type="button" value='<fmt:message key="button.back"/>' class="button" onclick="history.back()"/>
</td>
</tr>
</c:set> -->
<c:if test="${from=='update' or param.handle =='update'}">
<tr>
<th>
<manhourpool:label key="TcsBoxForm.tcs_box_id"/>
</th>
<td>
<html:text property="tcs_box_id" styleId="tcs_box_id" readonly="true"></html:text>
</td>
</tr>
</c:if>
<tr>
<th>
<manhourpool:label key="TcsBoxForm.code"/>
</th>
<td>
<html:text property="tcs_box_code" styleId="tcs_box_code" ></html:text>
</td>
</tr>
<tr>
<th>
<manhourpool:label key="TcsBoxForm.tcs_box_name"/>
</th>
<td>
<html:text property="tcs_box_name" styleId="tcs_box_name" ></html:text>
</td>
</tr>
<tr>
<th>
<manhourpool:label key="TcsBoxForm.companycode"/>
</th>
<td>
<html:select property="company_code" styleId="company_code" onchange="changeCompany_Code(this)">
<html:options collection="companyLst" property="code" labelProperty="name" />
</html:select>
</td>
</tr>
<tr>
<th>
<manhourpool:label key="TcsBoxForm.burea"/>
</th>
<td>
<html:select property="bureau_id" styleId="bureau_id" >
<html:options collection="bureauLst" property="code" labelProperty="name" />
</html:select>
</td>
</tr>
<tr>
<th>
<manhourpool:label key="TcsBoxForm.district"/>
</th>
<td>
<html:select property="district_id" styleId="district_id" >
<html:options collection="districtLst" property="code" labelProperty="name" />
</html:select>
</td>
</tr>
<tr>
<th>
<manhourpool:label key="TcsBoxForm.address"/>
</th>
<td>
<html:text property="tcs_address" styleId="tcs_address" ></html:text>
</td>
</tr>
<c:if test="${from=='update' or param.handle =='update'}">
<tr>
<th>
<manhourpool:label key="chartem.state"/>
</th>
<td>
<html:select property="state" >
<html:options collection="doms" property="column_value" labelProperty="description"/>
</html:select>
</td>
</tr>
</c:if>
</table>
<table align="center">
<!-- <c:out value="${pageButtons}" escapeXml="false"/> --></table>
</html:form>
<script type='text/javascript' src='dwr/interface/bureauManager.js'></script>
<script type='text/javascript' src='dwr/interface/districtManager.js'></script>
<script type='text/javascript' src='dwr/engine.js'></script>
<script type='text/javascript' src='dwr/util.js'></script>
<script type="text/javascript">
var bureau_on_load=true;
var bureau_id='<c:out value="${tcsBoxForm.bureau_id}"/>';
window.onload=function(){
window.changeCompany_Code(document.all.company_code);
var ppage = window.parent.document.frames['theiframtwo'];
if('<c:out value="${handlesucc}" />'){
ppage.document.getElementById('viewBoxes').submit();
}
}
function changeCompany_Code(sel_obj)
{
var company_code=sel_obj.value;
if(company_code=='')
return;
var param =new Object();
param.company_code=company_code;
bureauManager.getBureauListInDwr(param,showBureau);
districtManager.getDistrictBycompany(company_code,showDistrict);
}
function showBureau(bureaus)
{
// var bureau_id=$('bureau_id').value;
// if(window.bureau_on_load)
// {
// bureau_id='<c:out value="${param.bureau_id}"/>';
// window.bureau_on_load=false;
// }
DWRUtil.removeAllOptions('bureau_id');
var op=document.createElement('option');
op.value='';
op.text='<fmt:message key="task.default" />';
$('bureau_id').options.add(op);
DWRUtil.addOptions('bureau_id',bureaus,'bureau_id','bureau_name');
for(var i=0;i<$('bureau_id').options.length;i++)
{
if($('bureau_id').options[i].value==bureau_id)
{
$('bureau_id').selectedIndex=i;
break;
}
}
}
function showDistrict(dis)
{
var dis_code=$('district_id').value;
if(window.isOnload)
{
dis_code='<c:out value="${taskInfoForm.district_id}"/>';
window.isOnload=false;
}
DWRUtil.removeAllOptions('district_id');
var op=document.createElement('option');
op.value='';
op.text='<fmt:message key="task.default" />';
$('district_id').options.add(op);
DWRUtil.addOptions('district_id',dis,'code','name');
for(var i=0;i<$('district_id').options.length;i++)
{
if($('district_id').options[i].value==dis_code)
{
$('district_id').selectedIndex=i;
break;
}
}
}
</script>
分享到:
相关推荐
dwr实现2级级联菜单dwr实现2级级联菜单dwr实现2级级联菜单dwr实现2级级联菜单dwr实现2级级联菜单dwr实现2级级联菜单dwr实现2级级联菜单dwr实现2级级联菜单dwr实现2级级联菜单
dwr的例子。能够让你轻松了解dwr的使用方法。
Ajax的dwr框架实现级联源码,大家有用到的可以看一下
这是一个级联菜单,使用ajax技术,采用了dwr框架,选择省份,城市自动加载,以此类推,可以实现多种级联效果
dwr实例dwr实例dwr实例dwr实例dwr实例dwr实例dwr实例dwr实例dwr实例dwr实例dwr实例dwr实例dwr实例dwr实例dwr实例dwr实例dwr实例dwr实例dwr实例dwr实例dwr实例dwr实例dwr实例dwr实例dwr实例dwr实例dwr实例dwr实例dwr...
刚学dwr 自己写的三级联动下拉框 DWR版本 3.0 数据库 Ms SQL 2005 环境 Myeclipse 8.x 有问题联系 :Mr .陈 MSN czw30110@hotmail.com
通过一个小例子,让你明白级联菜单也就是这样的。。。 还有一本书pdf格式的,很实用! 希望能够帮到你们!
用java和dwr框架实现一个简单的例子 级联菜单 数据库用sql2000 myesclipse
AJAX-DWR下拉框级联AJAX-DWR下拉框级联 真正实用的`仅供参考
实现ssh+dwr的3级联 相关包已经删除。。文件过大。。源文件
dwr实例教程 很好的入门实例 学习完可以很好的使用动态验证登录 菜单动态刷新
自己写的dwr实例。方便大家学习,包括jar文件,希望对大家有帮助
dwr.demo dwr实例dwr.demo dwr实例dwr.demo dwr实例dwr.demo dwr实例dwr.demo dwr实例dwr.demo dwr实例dwr.demo dwr实例
一个简单DWR学习二级菜单实例一个简单DWR学习二级菜单实例一个简单DWR学习二级菜单实例一个简单DWR学习二级菜单实例一个简单DWR学习二级菜单实例一个简单DWR学习二级菜单实例一个简单DWR学习二级菜单实例
dwr实例操作+rmi实例操作 dwr实例操作+rmi实例操作
dwr经典实例(9个常用实例)dwr经典实例(9个常用实例)
SSH + dwr 实现三级级联 原代码下载
ssh+dwr(实现3级联) 由于文件过大,把相关包已经删除, 下载的都是源代码!
DWR实例讲解 DWR实例讲解,dwr,ajax,js 讲了各个属性以及配置文件的要点! DWR实例讲解 DWR实例讲解,dwr,ajax,js 讲了各个属性以及配置文件的要点!
API_CHM DWR实例 API_CHM DWR实例 API_CHM DWR实例 API_CHM DWR实例 API_CHM DWR实例 API_CHM DWR实例 API_CHM DWR实例 API_CHM DWR实例