实际上我有跟随代码工作,但它总是在第一个记录[0]:echo $ this-> bills [0] ['id'];,我怎么能改变它以获得选择的记录双击?
这里是zend中视图对象的代码:
echo '<table id="tabla_listado_cuentas">';
echo '<thead>';
echo '<tr>';
echo "<th><a href=''>Id Factura</a></th>";
echo "<th><a href=''>Estado Factura</a></th>";
echo '</tr>';
echo '</thead>';
echo '<tbody>';
echo '<td id="ident">'.$bill['id'].'</td>';
echo '<td id="td_con_separacion" class="estado">'.$bill['estado']."</td>";
echo "</tr>";
echo '</tbody>';
echo '</table>';
echo '</form>';
?>
<script>
$(".estado").editable("<?php echo $this->baseUrl().'/bills/update-Ajax'?>", {
indicator : "Guardando...",
tooltip : 'Click para editar',
data : " {'payed':'Pagada','acepted':'Aceptada','pending':'Pendiente','denied':'Deniegada'}",
type: 'select',
submit: 'Ok',
event : "dblclick",
placeholder : '...',
submitdata : function(value, settings) {
return {column: "estado", estado: "<?php echo $this->bills[0]['estado']; ?>", bill: "<?php echo $this->bills[0]['id'];?>"};
}
});
</script>
提前多多感谢