All articles| All Pictures| All Softwares| All Video| Go home page| Write articles| Upload pictures

Reading number is top 10 articles
C#好书盘点_[Asp.Net教程]
.NET基础知识-.NET框架_[Asp.Net教程]
SQL细节知识积累_[SQL,Server教程]
我国互联网营销的发展与创新_百度优化_seo学堂
visual c++ MFC调试宏
Ajax标签导航实例详解-Javascript技巧篇_[AJAX教程]
sql中获得部分时间的方法_[SQL Server教程]
SQL,Server,2005,CE基础概要_mssql学习_编程技术
实例:用PHP技术解决网站URL格式过长的问题_php资料_编程技术
PHP开发中关于文件操作的疑难问答_[PHP教程]
Reading number is top 10 pictures
真正的国产-非模拍 贵在是真实1
The real super beauty4
NeedWallpaper5
Park waits to have her picture taken exposed
Born After 90 Beijing sports university campus flower photos4
Wild animals melee moment of life and death1
The world's top ten most beautiful railway station1
生活中总有些低调的人,不经意间散发出土豪的气质
陪睡门马睿菈自曝写真 称首拍大尺度照片3
Small s breast enhancement demonstration
Download software ranking
Sora aoi, the maid, students' uniforms
美女写真3
Dance with duck(male prostitution)
Eclipse-CALMSANNY (second edition)
虚拟机5.5.3版
Wild things 2
The hero
Ashlynn Video2
Boxer's Top ten classic battle1
Boxer vs Yellow5
aaa published in(发表于) 2013/12/15 8:42:05 Edit(编辑)
ASP.NET:多级下拉菜单的级连显示问题_.net资料_编程技术

ASP.NET:多级下拉菜单的级连显示问题_.net资料_编程技术

ASP.NET:多级下拉菜单的级连显示问题_.net资料_编程技术-你的首页-uuhomepage.com







多级下拉菜单的级连显示问题。




在这里,我为了实现公司-部门级连显示问题,我编写了leader_add_competence_dialogquery.jsp ,web.xml,SelectCropDepartServlet.java 类。




其中注意的是leader_add_competence_dialogquery中的.jspChange_Select() javascript函数中的/selectCropDepart是在web.xml中定义的servlet类。我们在实现应用当中需要修改的用红字标出。




其中leader_add_competence_dialogquery.jsp代码如下:




<%@ page contentType="text/html; charset=gbk" language="java" import="java.sql.*" errorPage="" %>




<%@ page import="pub.*" %>




http://www.w3.org/TR/html4/loose.dtd">










添加领导权限




























<%




String strUserID=request.getParameter("Key");




session.setAttribute("EmployUserID",strUserID);




%>
























&nbsp;&nbsp;当前位置:系统管理&gt;&gt;领导设置&gt;&gt;添加领导权限










































公司:


























部门:























&nbsp;&nbsp;&nbsp;&nbsp;




















<%




Conn conn=new Conn();




String m1Script="";




//String m2Script="";




m1Script=PubClass.BindAllCorpList("document.all.Corp");




//m2Script=PubClass.BindAllDepartList("document.all.Depart",""+session.getAttribute("cropid"));




//sPositionList=conn.bindDropListSel("document.all.PositionName","select * from sys08_Position","PositionName","PositionID");




%>




<%= m1Script%>










Web.xml代码如下:










xmlns="http://java.sun.com/xml/ns/j2ee"




xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"




xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee




http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">







selectCropDepart




pub.SelectCropDepartServlet










selectCropDepart




/selectCropDepart













SelectCropDepartServlet.java Servlet类代码如下




/**




* 从sys04_Machine表中取数据进行二级下拉菜单(公司,部门)及关联的servlet类




* @author 邓浩




*/




public class SelectCropDepartServlet extends HttpServlet {




public SelectCropDepartServlet() {




super();




}




public void destroy() {




super.destroy(); }




/**




* The doGet method of the servlet.




*




* This method is called when a form has its tag value method equals to get.




*




* @param request the request send by the client to the server




* @param response the response send by the server to the client




* @throws ServletException if an error occurred




* @throws IOException if an error occurred




*/




public void doGet(HttpServletRequest request, HttpServletResponse response)




throws ServletException, IOException {




response.setContentType("text/xml");




response.setCharacterEncoding("UTF-8");




response.setHeader("Cache-Control", "no-cache");




String targetId = request.getParameter("id").toString();




String xml_start ="";




String xml_end = "";




String xml = "";




try{




Conn conn=new Conn();




DataTable dt=new DataTable();




String Sql="select * from sys04_Machine where cropid="+targetId;




////System.out.println("Sql:"+Sql);




xml+= "" ;




int i=0;




if (conn.querySql(Sql,dt)){




while (i


xml+= "";




i=i+1;




}




}




String last_xml = xml_start + xml + xml_end;




//System.out.println("last_xml:"+last_xml);




// last_xml = new String(last_xml.getBytes("UTF-8"), "GB2312");




response.getWriter().write(last_xml);




}// try




catch (Exception e){




System.out.print(e.getMessage());




}




}




public void doPost(HttpServletRequest request,HttpServletResponse response) throws ServletException,IOException{




doGet(request,response);




}




public void init() throws ServletException {




}




}






















添加到del.icio.us 添加到新浪ViVi 添加到百度搜藏 添加到POCO网摘 添加到天天网摘365Key 添加到和讯网摘 添加到天极网摘 添加到黑米书签 添加到QQ书签 添加到雅虎收藏 添加到奇客发现 diigo it 添加到饭否 添加到飞豆订阅 添加到抓虾收藏 添加到鲜果订阅 digg it 貼到funP 添加到有道阅读 Live Favorites 添加到Newsvine 打印本页 用Email发送本页 在Facebook上分享


Disclaimer Privacy Policy About us Site Map

If you have any requirements, please contact webmaster。(如果有什么要求,请联系站长)
Copyright ©2011-
uuhomepage.com, Inc. All rights reserved.