Dear Friends,
I give below my coding.My requirement is as below.
I am generating a table with three columns and one column is having a hyperlink and another 2 columns have checkboxes.
Basically it is for the candidate profile.
So after clicking the hyperlink ,i will get the second page wherein i will get the candidate details.After going thro'the same i will come back to first screen,where against the candidate name i will select the options provided in the two check boxes.I will repeat the procedure for the next candidate.
But the problem is that when i go for the second candidate and view his profile and after coming to the first page ,the status of the first candidates becomes blank and it is not setting back to the original position.
In a nutshell my settings at the checkboxes for the first candidate should not get changed even after going to and from the
first page.
My problem is that i should not use javascript.
My coding:
<%@ page language="java" session="true"%>
<%@ page import="javax.servlet.*,javax.servlet.http.*,java.util.*, java.sql.*, java.io.*" %>
<html>
<head>
<title>New Candidates</title></head>
<body>
<%!
String req =" ";
String jid =" ";
String cid =" ";
String ca_title =" ";
String status =" ";
String action =" ";
int count = 0;
Connection con;
ResultSet rs;
Statement st;
String sql;
%>
<%
req = request.getParameter("ca_title");
jid = request.getParameter("jid");
status = request.getParameter("status");
action = request.getParameter("action");
cid = request.getParameter("cid");
%>
<input type="hidden" name="ca_title" value="<%=req%>">
<input type="hidden" name="cid" value="<%=cid%>">
<input type="hidden" name="jid" value="<%=jid%>">
<p>New Candidates</p>
<p>Project Managers</p>
<p>(Click name for Profile Summary</p>
<p>
<table>
<tr><td>Candidate Name </td>
<td>Status </td>
<td>Action</td>
</tr>
<%
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con = DriverManager.getConnection("jdbc
dbc:info","shop","shop");
st = con.createStatement();
sql = "select candidateID,CAFirstName from candidate where catitle like '%"+req+"%'";
rs = st.executeQuery(sql);
while(rs.next())
{
String aa = rs.getString("candidateID");
String bb = rs.getString("CAFirstName");
%>
<tr><td><a href="http://localhost:8080/infodream/detail.jsp?cand_name=<%=bb.trim()%>&cand_id=<%=aa%>&jid=<%=jid%>&cid=<%=cid%>&ca_title=<%=req%>"><%=bb.tri m()%></td>
<td><SELECT name=status>
<OPTION value="<%=status%>" selected></OPTION>
<OPTION value=S>Selected</OPTION>
<OPTION value=R>Rejected</OPTION>
</SELECT><BR>
</td>
<td><SELECT name=action>
<OPTION value="<%=action%>" selected></OPTION>
<OPTION value=IWI>I Will Interview</OPTION>
<OPTION value=YS>You Screen</OPTION>
<OPTION value=C>Confirmed</OPTION>
</SELECT><BR>
</td>
</tr>
<%
}//while
}//try
catch(Exception e)
{
out.println("Exception "+e);
}
%>
</table><br><br><br><br><br>
<a href="http://localhost:8080/infodream/scrcandidates.html">Send</a>
<a href="http://localhost:8080/infodream/scrcandidates.html">Back</a>
<a href="http://localhost:8080/infodream/scrcandidates.html">Menu</a>
</p>
</body>
</html>
Please give your feedback.
Regards,
Ramamoorthy