hi,
it's me again
. I have a problem on detecting the checkboxes.
In a.jsp, i have the following code in a form.
<%
for (int j=0; j<size; j++) {
if(isLinked){
%>
<input type="checkbox" name="table<%=j%>" value="<%=tablename%>" checked/>
<%}else{%>
<input type="checkbox" name="table<%=j%>" value="<%=tablename%>" />
<%
}
}
%>
In a_action.jsp, which is the action page of the form, I detect the check boxes as followings:
<%
for (int i=0; i<size; i++) {
String tn = request.getParameter("table" + i);
if (tn!=null) {
//do something
}
}
%>
The problem is in a.jsp, checkboxes will be checked by default if isLinked==true, so i cannot detect they are checked or not by the action in a_action.jsp. String tn will always be null no matter i uncheck or check the default checked ones.
Can anyone suggest me how to handle this matter?
thx a lot.
ypc