It work if I code it as below: $('#tonus').tooltip({ delay: 0, showURL: false, bodyHandler: function() { return "<div><table> <tr><td>Blue</td><td>Water</td></tr> <tr><td>Red</td><td>Fire</td></tr> <tr><td>Green</td><td>Tree</td></tr> <tr><td>White</td><td>Cloud</td></tr> </table></div>"; } });
I not sure why when I code it as $('#tonus').tooltip({ delay: 0, showURL: false, bodyHandler: function() { return "<jsp:include page='legend-table.jsp'/>" } }); It not working... Any Idea? Thanks On Dec 20, 2:51 am, brian <zijn.digi...@gmail.com> wrote: > It's been awhile since i used JSP but the first thing I'd check is if > the content was parsed correctly. When you view source, do you see the > content in the JS code or do you see the JSP tag? If the latter, your > JSP code isn't being parsed on the server. > > On Sat, Dec 19, 2009 at 10:31 AM, HenryRock > > > > <henryloke.myetr...@gmail.com> wrote: > > The tooltip plugin I refer to ishttp://jquery.bassistance.de/tooltip/demo/ > > > One of the function is return a HTML tag. > > > $('#tonus').tooltip({ > > delay: 0, > > showURL: false, > > bodyHandler: function() { > > return $("").attr("src", this.src); > > } > > }); > > > Now I have a FIXED and LONG ( Table of Legend )html tag to return from > > function above. > > I try to put the html to another jsp. Then point the return to that > > jsp as below: > > > Example: > > > $('#tonus').tooltip({ > > delay: 0, > > showURL: false, > > bodyHandler: function() { > > return "<jsp:include page='legend-table.jsp'/>" > > } > > }); > > > The content of the legend-table.jsp as below: > > > <table> > > <tr><td>Blue</td><td>Water</td></tr> > > <tr><td>Red</td><td>Fire</td></tr> > > <tr><td>Green</td><td>Tree</td></tr> > > <tr><td>White</td><td>Cloud</td></tr> > > ....... > > </table> > > > The code above not working.... I guess the bodyHandler function cannot > > use include page. ANy Idea? > > > Thanks