// CISend sends a modify command to the web server // Parameters: // Operand: for example MW0 // Value function CISend(Operand,Value) { var found; var href; if ( Value == "NaN" ) { alert("Value is not a number"); return; } // Verify variable value if ( (Value < -65535) || (Value > 65535) ) { alert("Allowed range for value is -65535 to 65535"); return; } // Strip previous modify command from URL href = this.location.href; found = href.indexOf("?"); if ( found > 0 ) { href = href.substring(0, found); } // Now add modify command to URL and reload this.location.href = href + "?ci:" + "M" + Operand + "=" + Value; }