enumeration

S

snowy

hi,
i hav a table name schange in sql database.with the fields as follows
p_s_no(varchar),r_ps_no(vchar),d(int),m(int),y(int).in my first form
input all the above mention values and the data is displayed.now the
problem is i hav the checkbox in the table and clicking the checkbox i
hav to delete the row from the database.how can i give the name of the
checkbox so that it identifies the checbox and passes the value to be
deleted.
i m writing
out.print("<input type='checkbox' name='key'+p_s_no+d+m+y >");
is this possible to write in this way.will it submit the value
p_s_no+d+m+y with the key.i m doing but its not happening.
after this i hav written the following code
<%
Enumeration enum=request.getParameterNames();
while(enum.hasMoreElements())
{
String ParameterName=(String)enum.nextElement();
if(ParameterName.startsWith("key"));
{
String psno=ParameterName.substring(3,9);
int dd=Integer.parseInt(ParameterName.substring(9,11));
int m_m=Integer.parseInt(ParameterName.substring(11,13));
int yy=Integer.parseInt(ParameterName.substring(13,15));
String value=request.getParameter(ParameterName);
out.print("<td>"+psno+"&nbsp;"+dd+"/"+m_m+"/"+yy+"&nbsp;"+value);
out.print("</td>");
}

out.print("</tr>");
}
out.print("</table>");
%>
script used is java script.

plz help its urgent
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,129
Latest member
FastBurnketo
Top