This is my html code
<table width="62%" height="70" border="1" cellpadding="0" cellspacing="0" id="edit">
<?php if(count($voucher_info) > 0 ){ ?>
<tr class="bgcolor_02">
<td width="27%" align="center" class="admin" >S.no</td>
<td width="37%" align="center" class="admin" >Voucher Type</td>
<td width="47%" align="center" class="admin" >Voucher Mode</td>
</tr>
<?php
$rownum = 1;
foreach($voucher_info as $eachrecord){
$zibracolor = ($rownum%2==0)?"even":"odd";
?>
<tr align="center" class="narmal">
<td height="25"><?php echo $eachrecord->voucher_id ; ?><input type="hidden" name="voucher_id[]" value="<?php echo $eachrecord->voucher_id; ?>" /></td>
<td><input name="vouchertype[]" type="text" value="<?php echo $eachrecord->voucher_type; ?>" id="vouchertype"/></td>
<td><select name="mode[]" >
<option value="paidin" <?php if($eachrecord->voucher_mode=='paidin'){ ?> selected="selected" <?php } ?>>Paid In</option>
<option value="paidout" <?php if($eachrecord->voucher_mode=='paidout'){ ?> selected="selected" <?php } ?>>Paid Out</option>
</select></td>
</tr>
<?php
}
}
else{
echo "<tr class='bgcolor_02'>";
echo "<td align='center'><strong>No records found</strong></td>";
echo "</tr>";
}
?>
</table>
<input id="update" type="submit" name="submit" value="Edit"/>
I just want to know how do I access vouchertype and mode in javascript and pass them to controller using ajax. I want to save updated values to database. Please anybody has any idea, then tell me.
\n"; /*Insert the $value here*/ }`. – amitthk Feb 10 '15 at 06:11