A
albert kao
How to call the tablekit javascript library in jsp?
I downloaded the tablekit javascript library and put it in the js
directory which is in the jsp directory.
i.e. the directory is
C:\workspace\com.mycomp.data.war\WEB-INF\jsp\js
The jsp page is as follows and display correctly with FF and chrome on
Windows Vista.
However, the column of the page is not sorted by clicking on the
column.
i.e. the tablekit javascript library sorting function does not work
on the web page generated by jsp.
<html xmlns="http://www.w3.org/1999/xhtml">
<body>
<table border="1" class="sortable resizable"
style="width:100%;background-color:#FFA69C;border-collapse:
collapse">
<thead>
<tr>
<td colspan="2">
<h3 style="text-align:center">Data</h3>
</td>
</tr>
<tr>
<th class="sortfirstdesc" id="data">Data</th>
<th id="message">Message</th>
</tr>
</thead>
<tbody>
<c:forEach items="${model.datas}" var="data">
<tr>
<td> <style="font-family:monospace">${data.id}
</td>
<td> <style="font-family:monospace">${data.message}
</td>
</tr>
</c:forEach>
</tbody>
</table>
<script type="text/javascript" src="js/prototype.js"></script>
<script type="text/javascript" src="js/fabtabulous.js"></script>
<script type="text/javascript" src="js/tablekit.js"></script>
</body>
</html>
I downloaded the tablekit javascript library and put it in the js
directory which is in the jsp directory.
i.e. the directory is
C:\workspace\com.mycomp.data.war\WEB-INF\jsp\js
The jsp page is as follows and display correctly with FF and chrome on
Windows Vista.
However, the column of the page is not sorted by clicking on the
column.
i.e. the tablekit javascript library sorting function does not work
on the web page generated by jsp.
<html xmlns="http://www.w3.org/1999/xhtml">
<body>
<table border="1" class="sortable resizable"
style="width:100%;background-color:#FFA69C;border-collapse:
collapse">
<thead>
<tr>
<td colspan="2">
<h3 style="text-align:center">Data</h3>
</td>
</tr>
<tr>
<th class="sortfirstdesc" id="data">Data</th>
<th id="message">Message</th>
</tr>
</thead>
<tbody>
<c:forEach items="${model.datas}" var="data">
<tr>
<td> <style="font-family:monospace">${data.id}
</td>
<td> <style="font-family:monospace">${data.message}
</td>
</tr>
</c:forEach>
</tbody>
</table>
<script type="text/javascript" src="js/prototype.js"></script>
<script type="text/javascript" src="js/fabtabulous.js"></script>
<script type="text/javascript" src="js/tablekit.js"></script>
</body>
</html>