Dojo Tooltip Spring and variable
I have a dojo tooltip in a jspx (roo project) page.
dojo.addOnLoad(function() {
// create a new Tooltip and connect it to bar1 and bar4
tooltip1=new dijit.Tooltip({
connectId : [ "iconInfo"],
label : "myDesc",
position : [ "below" ]
});
})
I would like to replace the tooltip label : "myDesc" by my var ${p开发者_如何学编程hotodesc}.
How can I do that ?
Forgive me if I have completly misunderstood your question, but are you just looking for to do this:
dojo.addOnLoad(function() {
// create a new Tooltip and connect it to bar1 and bar4
tooltip1=new dijit.Tooltip({
connectId : [ "iconInfo"],
label : "${photodesc}",
position : [ "below" ]
});
});
This is assuming that the 'photodesc' is in the scope of the JS you have written.
In addition, you may want to output the 'photodesc' variable using the c:out tag as this escapes HTML characters to avoid cross-site scripting.
精彩评论