No check out the server side script widget. This allows you to do all sorts of things.
Here are some example scripts. The ones with images probably wont work as the image path won't be right but they should be useful:
------------------------------------------------------------------------------
//Server Side Script
//Drop Down List
------------------------------------------------------------------------------
var s="";
var idx = 0;
s = "<select onchange='idx=this.options(this.selectedIndex).value; \
if (idx == 0) mango.view.setPoint("+ point.id +", \""+ pointComponent.id +"\", \"0\"); \
if (idx == 14) mango.view.setPoint("+ point.id +", \""+ pointComponent.id +"\", \"14\"); \
if (idx == 32) mango.view.setPoint("+ point.id +", \""+ pointComponent.id +"\", \"32\"); \
if (idx == 3) mango.view.setPoint("+ point.id +", \""+ pointComponent.id +"\", \"3\"); \
if (idx == 94) mango.view.setPoint("+ point.id +", \""+ pointComponent.id +"\", \"94\"); \
if (idx == 55) mango.view.setPoint("+ point.id +", \""+ pointComponent.id +"\", \"55\"); \
return value;'> \
<option value=0>Zero</option> \
<option value=14>Fourteen</option> \
<option value=32>ThirtyTwo</option> \
<option value=3>Three</option> \
<option value=94>Ninety Four</option> \
<option value=55>fIFTYFive</option> \
</select>";
return s;
------------------------------------------------------------------------------
//Server Side Script
//increase value and image on click
------------------------------------------------------------------------------
var s = "";
if (value == 0)
s += "<img style='cursor:pointer;' src='graphics/LDI/startcal-green.gif' onclick='mango.view.setPoint("+ point.id +", \""+ pointComponent.id +"\", \"1\");return 1;'/>";
else if (value == 1)
s += "<img style='cursor:pointer;' src='graphics/LDI/startcal-blue.gif' onclick='mango.view.setPoint("+ point.id +", \""+ pointComponent.id +"\", \"2\");return 2;'/>";
else if (value == 2)
s += "<img style='cursor:pointer;' src='graphics/LDI/startcal-yellow.gif' onclick='mango.view.setPoint("+ point.id +", \""+ pointComponent.id +"\", \"3\");return 3;'/>";
else if (value == 3)
s += "<img style='cursor:pointer;' src='graphics/LDI/startcal-brown.gif' onclick='mango.view.setPoint("+ point.id +", \""+ pointComponent.id +"\", \"0\");return 0;'/>";
return s;
------------------------------------------------------------------------------
//Server Side Script
//Decrease the value on click with image:
------------------------------------------------------------------------------
var result = "";
result += "<span onclick='mango.view.setPoint("+ point.id+", "+ pointComponent.id +", \""+ (value - 1) +"\")'>";
result += "<img src='/images/updownarrow/downBenchmark.png'/>";
return result;
------------------------------------------------------------------------------
//Server Side Script
//Increase the value on Click with image:
------------------------------------------------------------------------------
var result = "";
result += "<span onclick='mango.view.setPoint("+ point.id+", "+ pointComponent.id +", \""+ (value + 1) +"\")'>";
result += "<img src='/images/updownarrow/upBenchmark.png'/>";
return result;
------------------------------------------------------------------------------
//Server Side Script for point display with decimal place control - change (0) for # of decimals
------------------------------------------------------------------------------
return '<span style="font-size:16px;">'+ value.toFixed(1) +'</span>';
return '<span style="font-size:16px;">Collector: '+ '<font color="blue">'+ value.toFixed(0) +' °F</span>'; ------------------------------------------------------------------------------
//Server Side Script
//Toggle on image click
------------------------------------------------------------------------------
var s = "";
if (!value)
s += "<img style='cursor:pointer;' src='graphics/Drinks/drink_empty.png' onclick='mango.view.setPoint("+ point.id +", \""+ pointComponent.id +"\", \"true\");return true;'/>";
else if (value)
s += "<img style='cursor:pointer;' src='graphics/Drinks/drink.png' onclick='mango.view.setPoint("+ point.id +", \""+ pointComponent.id +"\", \"false\");return false;'/>";
return s;
------------------------------------------------------------------------------
//Server Side Script
//Turn on with click but can't turn off
------------------------------------------------------------------------------
var s = "";
if (!value)
s += "<img style='cursor:pointer;' src='graphics/LDI/StartPreset-Green.gif' onclick='mango.view.setPoint("+ point.id +", \""+ pointComponent.id +"\", \"true\");return true;'/>";
else if (value)
var s = "";
if (value)
s += "<img src='graphics/LDI/StartPreset-Yellow.gif'/>";
return s;
------------------------------------------------------------------------------
//Server Side Script
//Toggle with text and Image:
------------------------------------------------------------------------------
var s = "";
s += "<a href='#' onclick='mango.view.setPoint("+ point.id +", \""+ pointComponent.id +"\", \""+ !value +"\");return false;'>Toggle</a>";
s += " its state.";
if (value)
s += "<img style='cursor:pointer;' src='graphics/Drinks/drink.png' onclick='mango.view.setPoint("+ point.id +", \""+ pointComponent.id +"\", \"false\");return false;'/>";
else
s += "<img src='graphics/Drinks/drink_empty.png'/>";
return s;
------------------------------------------------------------------------------
//Server Side Script
//On / Off / Toggle text no image:
------------------------------------------------------------------------------
var s = "";
s += "Or, use these scripted controls to turn the light ";
s += "<a href='#' onclick='mango.view.setPoint("+ point.id +", \""+ pointComponent.id +"\", \"false\");return false;'>";
s += value ? "Off" : "<b>Off</b>";
s += "</a>, ";
s += "<a href='#' onclick='mango.view.setPoint("+ point.id +", \""+ pointComponent.id +"\", \"true\");return false;'>";
s += value ? "<b>On</b>" : "On";
s += "</a>, or to ";
s += "<a href='#' onclick='mango.view.setPoint("+ point.id +", \""+ pointComponent.id +"\", \""+ !value +"\");return false;'>Toggle</a>";
s += " its state.";
return s;
------------------------------------------------------------------------------
//Server Side Script
//Change from On to off with font format
------------------------------------------------------------------------------
if (!value)
return "<span style="font-size:40px;"><font color="gray">Off</span>";
else if (value)
return "<span style="font-size:40px;">'+ '<font color="blue">'+' On</span>";
if (!value)
return "<span style="font-size:40px;">'+ '<font color="gray">'+ Off</span>";
else if (value)
return "<span style="font-size:40px;">'+ '<font color="blue">'+ On</span>";
return s;