Hi all,
I am retrieving some rows from DataBase using for loop in jsp and displaying it in a table format.In the output table I am also adding one more text box and checkbok with each row. In text box i have to enter some value manually and when i check its corresponding checkbox the value should get passes into another jsp.
This is a code by which i am assigning the name to textboxes and checkboxes
where i = number of rows retrieved.
Now to check and get the value of the textbox i am checking the checkbox value using javascript as :-
how can i retrieve the value of the various checkboxex and pass it to another jsp?
any help regarding how to do this will be appriciated .
I am retrieving some rows from DataBase using for loop in jsp and displaying it in a table format.In the output table I am also adding one more text box and checkbok with each row. In text box i have to enter some value manually and when i check its corresponding checkbox the value should get passes into another jsp.
This is a code by which i am assigning the name to textboxes and checkboxes
Code:
String[] arr_TextValues = new String[10]; String[] arr_ChkValues = new String[10]; arr_TextValues[i] = "Text"+i; arr_ChkValues[i] = "Chk"+i;
Code:
<td><input type=text name=<%=arr_TextValues[i]%> value=""/></td> <td><input type="checkbox" name=<%=arr_ChkValues[i]%> VALUE="0" align ="center" ></td> .
Code:
function check()
{
for(l=0;l< i;l++){
if(document.form1.chk0.checked ==true)
{
something to retrieve the value of textbox and pass it to another jsp!!!
}
}
any help regarding how to do this will be appriciated .
Comment