Hi,
I am trying to get an image to appear in a column of a view depending on the two option set selection (yes/no)
I created a new png web resource for each icon, a thumbs up and a thumbs down.
I created a javascript webresource as well:
function displayIconTooltip(rowData, userLCID) {
var str = JSON.parse(rowData);
var col_data = str.new_compliant_Value;
var imgName = "";
var tooltip = "{" + col_data +"}";
switch (col_data) {
case 1:
imgName = "new_ThumbsUp";
tooltip = "Good";
break;
case 2:
imgName = "new_ThumbsDown";
tooltip = "Bad";
break;
default:
imgName = "";
tooltip = "";
break;
}
var resultarray = [imgName, tooltip];
return resultarray;
}
In the view I changed the properties of the column to the javascript webresource and function.
I saved everything and published all.
When I run it though, I get nothing. No errors and no icons?
Did I do something incorrect? How does the javascript cases work?
Thanks,
Terry