вот кусок
<form action="#" method="POST" enctype="multipart/form-data" name="addcom" id="addcom" onSubmit="return false">
<input name="num_contr" type="text" size="150" id="num_contr" required>
<!-- ... -->
<table class="research">
<tbody>
<tr class="accordion">
<td colspan="3" class="vt">ВТ</td>
</tr>
<tr><td class="corr">....</td><td><input / type="Text" name= "prpvt" id="prpvt"></td></tr>
<tr><td>....</td><td><input / type="Text" name= "pdrpvt" id="pdrpvt"></td></tr>
<tr><td class="corr">....</td><td><input / type="Text" name= "rzrpvt" id="rzrpvt"></td></tr>
<tr><td>....</td><td><input / type="Text" name= "drpvt" id="drpvt"></td></tr>
<tr><td class="corr">....</td><td><input / type="Text" name= "ppvt" id="ppvt"></td></tr>
<tr><td class="corr">....</td><td><input / type="Text" name= "dkt" id="dkt"></td></tr>
<!-- ... -->
</tbody>
</table>
<input class="adscom" name="button" id="start" type="button" value='генерить' onclick="doLoad(document.getElementById('addcom'))">
</form>
и кусок
$(document).ready(function()
{
$('input[type=text]:text').change(function (){
$.post("ajax_all.php", { "num_contr" : $('input[type=text]').val()},
function(data){
var details = $("#prpvt").val(data);
});
});
});
и массив из обработчика (ajax_all.php):
$data = array(
'pdrpvt' => $row['pdrpvt'],
'rzrpvt' => $row['rzrpvt'],
'drpvt' => $row['drpvt'],
'ppvt' => $row['ppvt'],
'dkt' => $row['dkt']
);
echo json_encode($data);