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+" "+dd+"/"+m_m+"/"+yy+" "+value);
out.print("</td>");
}
out.print("</tr>");
}
out.print("</table>");
%>
script used is java script.
plz help its urgent
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+" "+dd+"/"+m_m+"/"+yy+" "+value);
out.print("</td>");
}
out.print("</tr>");
}
out.print("</table>");
%>
script used is java script.
plz help its urgent