Saturday, December 19, 2009

[jQuery] Can Tooltip return a jsp page?

The tooltip plugin I refer to is http://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

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate