Ho riscontrato un problema nel mostrare correttamente la libreria jQuery Datatables sulla mia tabella del sito Joomla. http://datatables.netTypeError: oColumn is undefined Quando si utilizza la libreria di datatables jQuery
Lo script è la metà styling mio tavolo e poi rinunciare (io sono sempre il colore cambiato e il testo di colore intestazione della tabella, ma non DataTable controlli, ecc).
Firebug è anche gettando il seguente errore:
TypeError: oColumn is undefined
Nei miei template di Joomla index.php ho quanto segue nella <head>
:
<script src="./datatables/js/jquery.js" type="text/javascript"></script>
<script src="./datatables/js/jquery.dataTables.js" type="text/javascript"></script>
<script type="text/javascript">
jQuery.noConflict();
jQuery(document).ready(function() {
jQuery('#staff_table').dataTable({
"bLengthChange": true,
"bFilter": true,
"bSort": true,
"bInfo": true,
"bAutoWidth": true
});
});
</script>
Il codice HTML/PHP assomiglia a questo:
<h3>Members of Staff</h3>
<p>If you're looking for a member of staff at Tower Road Academy, you'll find their details here.</p>
<table class="staff_table" id="staff_table">
<tr class="staff_table_head">
<th>Name</th>
<th>Job Title</th>
<th>Email Address</th>
</tr>
<?php
$result = mysql_query("SELECT * FROM itsnb_chronoforms_data_addstaffmember");
while($row = mysql_fetch_array($result))
{
echo '<tr>';
echo '<td>' . $row['staff_name'] . '</td><td>' . $row['staff_job'] . '</td><td><a href=mailto:"' . $row['staff_email'] . '">' . $row['staff_email'] . '</a>' . '</td>';
echo '</tr>';
}
?>
</table>
grazie, questo cliccato allo stesso tempo stavo scrivendo il seguito :-D –
@IainSimpson sì, ho appena imbattuto in questo poco tempo fa, quindi è stato proprio in cima della mia testa! – hsalama
ottimo aiuto..grazie .. – Charmie