I am a new comer. I have the similar problem like surendra’s. surendra wants to delete the row. But I want to send all the values in the row to the next page(where the checkbox checked).
@KorSep 16.2004 — #eerr... I don't know which is the problem you are talking about... You could insert a link to that thread...
I don't quite understand what values you are talking about and which is the next page...
Anyway, to not let you without some lines...
See below to try to get the text values from each rows cells. Is it of any help? [code=php] <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta http-equiv="Content-Style-Type" content="text/css"> <meta http-equiv="Content-Script-Type" content="text/javascript"> <head> <script language="JavaScript" type="text/JavaScript"> function getVal(r){ t = document.getElementById('tab').rows; al='the text values in the clicked row are:'; var celval= new Array() for(var i=0;i<t.length;i++){ for(var j=0;j<t[i].cells.length;j++){ if(r==t[i]){ celval[j]=t[i].cells[j].innerHTML; al=al+' | '+celval[j]; } } } alert(al) } </script> </head> <body> clik on a row to see the text values of the nested cells:<br> <table id="tab" width="500" border="1"> <tr onclick="getVal(this)"> <td>bla1</td> <td>foo1</td> </tr> <tr onclick="getVal(this)"> <td>bla2</td> <td>foo2</td> </tr> <tr onclick="getVal(this)"> <td>bla3</td> <td>foo3</td> </tr> </table>
I have a html table in that i have a form which contain a table.
table contains 5 rows,3 columns. In each row the table having 2 text fields and one checkbox.
For example i checked three combo boxes then the value of the text boxes in the same row should be retrieved and displayed in the next html or jsp page(there i can manipulate with it).
Any how ur previous reply was very helpful. If u help me in this regard it will be very appreciatable.
@javaNoobieSep 17.2004 — #The thread refered to is [url=http://www.webdeveloper.com/forum/showthread.php?s=&threadid=44390]this[/url]. Sorry i did not see your thread till today.
Logic for this is to disable those checkboxes that are not checked and their corresponding textboxes so that they will not be take into account when the form is submitted. Given your scenario.. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title>Example</title> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <script type="text/javascript"> function getValues(f){ for(var i=0; i<f.chk.length;i++){ if(!f.chk[i].checked){ //if not checked disable the row's input elements f.chk[i].disabled = true; f.elements['txt1_'+i].disabled = true; f.elements['txt2_'+i].disabled = true; }else{ //if checked, append the textboxes value to the checkbox's value. Delim is '|' f.chk[i].value = f.elements['txt1_'+i].value + '|' + f.elements['txt2_'+i].value; } }//end for }//end function </script> </head> <body> <form name="frm" onsubmit="getValues(this)" action="[color=red]<script here>[/color]" method="get"> <table> <tr> <td><input type="checkbox" name="chk"></td> <td><input type="text" id="txt1_0"></td> <td><input type="text" id="txt2_0"></td> </tr> <tr> <td><input type="checkbox" name="chk"></td> <td><input type="text" id="txt1_1"></td> <td><input type="text" id="txt2_1"></td> </tr> <tr> <td><input type="checkbox" name="chk"></td> <td><input type="text" id="txt1_2"></td> <td><input type="text" id="txt2_2"></td> </tr> <tr> <td><input type="checkbox" name="chk"></td> <td><input type="text" id="txt1_3"></td> <td><input type="text" id="txt2_3"></td> </tr> <tr> <td><input type="checkbox" name="chk"></td> <td><input type="text" id="txt1_4"></td> <td><input type="text" id="txt2_4"></td> </tr> </table> <button type="submit">Submit</button> </form> </body> </html>In this example i submitted to another page where i had a js function to decode the querystring which contains the info required.function decodeString() { valNum = new Array(); valData = new Array(); var string, orderData;