From: albert kao on 3 Feb 2010 10:07 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>
From: Stevo on 3 Feb 2010 10:21 albert kao wrote: > How to call the tablekit javascript library in jsp? > i.e. the tablekit javascript library sorting function does not work You'll be wanting a tablekit forum.
From: Thomas 'PointedEars' Lahn on 3 Feb 2010 13:18 albert kao wrote: > How to call the tablekit javascript library in jsp? *Please* get yourself informed what JSP is and what it does before you continue. Besides, libraries are _not_ called; functions in libraries are. > <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> > OMG. And *please* stop crossposting until you got that minimum clue. TIA. PointedEars -- Anyone who slaps a 'this page is best viewed with Browser X' label on a Web page appears to be yearning for the bad old days, before the Web, when you had very little chance of reading a document written on another computer, another word processor, or another network. -- Tim Berners-Lee
From: Scott Sauyet on 3 Feb 2010 13:35 On Feb 3, 10:07 am, albert kao <albertk...(a)gmail.com> wrote: > 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 This might be your problem. In my experience, resources like scripts or images should be placed relative to the web application's root directory, in your case, the JS should probably be in, C:\workspace\com.mycomp.data.war\js HTH, -- Scott
From: Lew on 3 Feb 2010 14:08 albert kao wrote: >> How to call the tablekit javascript library in jsp? Thomas 'PointedEars' Lahn wrote: > *Please* get yourself informed what JSP is and what it does before you > continue. There's no problem with the OP in that regard. One can, and often does embed Javascript in a JSP, wherein it becomes part of the generated HTML. You have no basis to your objection there. One calls Javascript libraries from JSP in exactly the way one does from HTML. Well, there are component frameworks like JSF that automagically generate Javascript for some of their functionality, but here we're talking about the application-specific JS that would be present regardless. > Besides, libraries are _not_ called; functions in libraries are. Yeesh. And people call me picky. To say that one "calls a library" is to say colloquially that one calls methods from that library. Take a chill pill. albert kao wrote: >> <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> Thomas 'PointedEars' Lahn wrote: > OMG. Yes? You rang? > And *please* stop crossposting until you got [sic] that minimum clue. There was a good reason why the OP cross-posted. It's not like they multi-posted. You should stop whining until you get that minimum clue. -- Lew
|
Next
|
Last
Pages: 1 2 Prev: FAQ Topic - When should I use eval? (2010-02-03) Next: web sites for sale $200 only each one |