0
클릭 할 때 행을 추가하는 방법을 알면 사용자를 페이지로 리디렉션합니다. 하지만 나는 그것을 할 수있는 방법에 인터넷에서 아무것도 찾을 수 없습니다. 여기 내 코드가 있습니다.클릭 가능한 데이터 링크가있는 테이블 행. CodeIgniter
컨트롤러
public function ajax_list()
{
$list = $this->Infoserbilis_model->get_datatables();
$data = array();
$no = $_POST['start'];
foreach ($list as $tblcontent) {
$no++;
$row = array();
$row[] = $no;
$row[] = $tblcontent->record_id;
$row[] = $tblcontent->title;
$row[] = $tblcontent->description;
$row[] = $tblcontent->type_id;
$row[] = $tblcontent->date_input;
$row[] = $tblcontent->encoded_by;
$row[] = $tblcontent->updated_by;
$row[] = $tblcontent->keywords;
$row[] = $tblcontent->broadclass_id;
$row[] = $tblcontent->agency_id;
$row[] = $tblcontent->contact_id;
$row[] = $tblcontent->approved;
$row[] = $tblcontent->approved_by;
$data[] = $row;
}
}
는 이것은 내보기
이다<table>
<tr>
<th>id</th>
<th>Record ID</th>
<th>Title</th>
<th>Description</th>
<th>Type</th>
<th>Encoded By</th>
<th>Updated By</th>
<th>Keywords</th>
<th>Broad Class</th>
<th>Agency</th>
<th>Contact</th>
<th>Approved?</th>
<th>Approved By</th>
</tr>
</table>
<script type="text/javascript">
var table;
$(document).ready(function() {
table = $('#table').DataTable({
"responsive": true,
"processing": true,
"serverSide": true,
"order": [],
"ajax": {
"url": "<?php echo site_url('Infoserbilis/ajax_list')?>",
"type": "POST"
},
"columnDefs": [
{
"targets": [ 0 ],
"orderable": false,
},
],
});
});
</script>
나 그것의 모든 내용은 단지 버튼/링크입니다 다른 열을 추가 도와주세요. 미리 감사드립니다.
그런 짓을? – Geshode