Reading the table fields I can do, but as soon as the <TD> element contains a input field, I am unable to read the cell value.
Is there any other way of doing this? On Nov 4, 12:07 pm, GrootBaas <[EMAIL PROTECTED]> wrote: > Hi there, > > I have the following table. And I need to save the user input to the > database. > > How can I do this…. > > I have used jQuery DB class. > > var arr_value = new Array( $($('.odo').select('.prvt_days'))[0][0], $($ > ('.odo').select('.prvt_days'))[0][1], $($('.odo').select('.prvt_days')) > [0][2] ); > > alert('array '+arr_value) > document.save_logs.table.value = arr_value; > > Works great for all the values except the form input values. Which is > the ones I need. > > Any help will be much appreciated, as my head is going to roll. > > echo "<table class=\"odo\" width=\"100%\">\n"; > > while ($veh_det = oci_fetch_assoc($veh_details)) { > > echo "<tr>\n"; > echo "<td class=\"period\" width=\"12%\" style= > \"padding: 2px;\">\n"; > echo $veh_det['PERIOD']; > echo "</td>\n"; > echo "<td class=\"start_odo\" width=\"12%\" style= > \"padding: 2px;\">\n"; > echo $veh_det['START_ODO']; > echo "</td>\n"; > echo "<td class=\"end_odo\" width=\"12%\" style= > \"padding: 2px;\">\n"; > echo form_input(array('name'=>'log_end_odo', > 'id'=>'log_end_odo', > 'maxlength'=>'20', > 'size'=>'20', > 'value'=> $veh_det['END_ODO']), > 1); > > echo "</td>\n"; > echo "<td class=\"prvt_km\" width=\"12%\" style= > \"padding: 2px;\">\n"; > echo form_input(array('name'=>'prvt_km', > 'id'=>'prvt_km', > 'maxlength'=>'20', > 'size'=>'20', > 'value'=> $veh_det['PRVT_KM']), > 2); > echo "</td>\n"; > echo "<td class=\"prvt_days\" width=\"12%\" style= > \"padding: 2px;\">\n"; > echo form_input(array('name'=>'prvt_days', > 'id'=>'prvt_days', > 'maxlength'=>'20', > 'size'=>'20', > 'value'=> $veh_det['PRVT_DAYS']), > 3); > } > > echo "</table>";