11.12.2017, 11:15
(11.12.2017, 11:06)baggins Wrote:I do it always in private browsing then you are sure all is fresh. Good practice is to clear browser cache when strange things start to happen.(11.12.2017, 10:28)Daniel. Wrote:That was actually the first thing I tried: I made an exact copy of the function and changed the address.(10.12.2017, 10:04)baggins Wrote:Hi(13.04.2016, 11:27)edgars Wrote: In the firmware starting from 4.2016 there is Custom JavaScript feature available in LogicMachine --> Scripting --> Tools --> Edit custom JavaScript.Hi,
It is possible to create different dynamic tasks, like detect short/long press from visualization using one icon (Erwin, will you please add your example here) or as in this example, we can open specific Floor/Plan when some grp address is triggered - useful e.g. when you want IP Camera page automatically to be opened when Intercom button is pressed:
Code:$(function(){
if (typeof objectStore !== 'undefined') {
var id = Scada.encodeGroupAddress('1/1/2');
objectStore.addListener(id, function(object, type) {
if (type == 'value') {
showPlan(69);
}
});
}
});
showPlan() value can be get when you hover your mouse over specific plan name and click on the arrow. Please see in pictures attached.
I have two addresses, say '1/1/2' and '1/1/3' that I want to use to trigger the same showPlan. I have absolutely no knowledge of javascript, so how do I modify this code?
Is my understanding correct that this code gets executed whenever any address is triggered?
Thanks.
Just use the function twice.
BR
The copy did not execute.
There is something strange going on.
I did some further testing and this script only works with the address I initially did the testing with. If I change the address to something else, it does not work.
Do I have to clear a cache somewhere?
Thanks.
------------------------------
Ctrl+F5
Ctrl+F5