Posted By:
anila_reddy
Posted On:
Monday, June 25, 2007 06:17 AM
Hi, I'm very new to AJAX. In my application there r 3 fields,username,password and project. As soon as the username and password are entered,the project list box shud b populated.My code is like this,Its working fine except that its taking more time. And after i select a project name from it,it automatically changes to default before the next page comes. Please tel me wats wrong in this code. Login.jsp is like this.. } ]]> Please enter your ID and Password to login Employee Name Passwo
More>>
Hi,
I'm very new to AJAX. In my application there r 3 fields,username,password and project. As soon as the username and password are entered,the project list box shud b populated.My code is like this,Its working fine except that its taking more time. And after i select a project name from it,it automatically changes to default before the next page comes. Please tel me wats wrong in this code.
Login.jsp is like this..
}
]]>
Please enter your ID and Password to login
And the getPrj.jsp is like this..
<%@ page import="java.sql.*" %>
<%@ page import="javax.sql.*" %>
<%@ page import="java.lang.*" %>
<%@ page import="java.lang.Object.*" %>
<%@ page import="java.io.*" %>
<%@ page import="java.util.*" %>
<%
String name=request.getParameter("a");
String empid="";
List ar=new ArrayList();
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con1 = DriverManager.getConnection("jdbc:odbc:sujay","timesheet","timesheet");
Statement st= con1.createStatement();
ResultSet rs = st.executeQuery("SELECT EMP_ID FROM TS_EMPLOYEE WHERE EMP_NAME='"+name+"'");
while(rs.next())
{
empid= rs.getString("EMP_ID");
}
out.println("
| Project |
|
");
%>
<<Less