我想添加DataTable javascript lib到我的Zendframe工作項目。所以可以將外部數據庫添加到ZendFrame的工作?以及如何將DataTable lib添加到我的zend項目中?爲Zendfreamework項目添加外部JavaScript庫
view.phtml
<script type="text/javascript">
var baseUrl = "<?php echo $this->baseUrl(); ?>";
$(document).ready(function(){
$('.jbutton').button();
});
$(document).ready(function() {
$('#example').dataTable();
});
</script>
<span id="edit-doctor" class="jbutton floatright marr5">
<a href="<?php
echo $this->url(
array(
'controller' => 'patients',
'action' => 'edit',
'id' => $this->patientId
), 'default', true
);
?>">Edit Patient</a>
</span>
<div class="clear"></div>
<?php $user = $this->user; ?>
<h1 class="title"><?php echo $user['name']; ?></h1>
<div class="underling-green"></div>
<div class="profile">
<div class="p-image">
<img src="<?php echo $this->baseUrl() . '/images/users/' . $user['image']; ?>"/>
</div>
<div class="category mart50">
<div class="sub-title">Personal Details</div>
<table>
<tbody>
<tr>
<td class="p-title">Email</td>
<td class="p-body">
<span class="p-seperate">:</span>
<?php echo $user['email']; ?>
</td>
</tr>
<tr>
<td class="p-title">Birth Day</td>
<td class="p-body">
<span class="p-seperate">:</span>
<?php echo $user['bday']; ?>
</td>
</tr>
<tr>
<td class="p-title">Telephone</td>
<td class="p-body">
<span class="p-seperate">:</span>
<?php echo $user['telno']; ?>
</td>
</tr>
<tr>
<td class="p-title">Address</td>
<td class="p-body">
<span class="p-seperate">:</span>
<?php echo $user['address']; ?>
</td>
</tr>
</tbody>
</table>
<table id="example">
<thead>
<tr>
<th>Column 1</th>
<th>Column 2</th>
<th>etc</th>
</tr>
</thead>
<tbody>
<tr>
<td>Row 1 Data 1</td>
<td>Row 1 Data 2</td>
<td>etc</td>
</tr>
<tr>
<td>Row 2 Data 1</td>
<td>Row 2 Data 2</td>
<td>etc</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="clear"></div>
我想拍 「榜樣」 表預覽作爲DataTalbe我該怎麼辦呢?
你到目前爲止試過了什麼?發佈您遇到的問題代碼,我們不在這裏做教程,但我們會幫助解決特定的編碼問題。 – vascowhite
我無法理解教程的邊界並幫助編碼問題。任何方式感謝您要求我的編碼我會附上我的問題 – user881703