Dojo And Javascript: Lightweight Tooltip In Onclick On Anchor Tab
I have a dojo datagrid and I am using a formatter that puts, among other things, link in the cell. The formatter looks like this: var descshort = value[1].substring(0,220); return
Solution 1:
I was able to call a function for a dojo dialog and pass the values as arguments to the dojo dialog! Also it took me a while to realize that in the formatter I need to use \ to escape some of the ' characters that are used to build the returned string while inserting values as arguments.
elliotDialog = new dijit.Dialog({
title: "My Dialog",
content: "test content",
style: "width: 450px"
});
showDesc = function(layer, layer2){
// set the content of the dialog:
elliotDialog.set("title", layer2);
elliotDialog.set("content", layer);
elliotDialog.show();
};
The onclick in the formatter looks like this:
onclick="showDesc(\'' + value[1] + '\',\'' + value[0] + '\');return false;"
Post a Comment for "Dojo And Javascript: Lightweight Tooltip In Onclick On Anchor Tab"