22.01.2018, 07:01
(16.12.2016, 14:58)admin Wrote: Please post in English next timeHi admin, I have some problems with this script.
The task is to show a specific plan depending on a certain object value.
Code:$(function(){ if (typeof grp != 'undefined') { grp.listen('1/1/1', function(object, state) { var value = object.value; if (state == 'value') { if (value == 1) { showPlan(11); } else if (value == 2) { showPlan(12); } else if (value == 3) { showPlan(13); } } }); } });
I use boolen object, I changed value == 1 to value == true/false.
When I'm changing value from false to true, my visu page is switching.
But when I Send True once again nothing happens. to make it works I nedd to switch my object to false and then to true.
whats the reason of this behavour? (tested on 20170620 FW)
the second thing I need is the opposite task. I need to write some value to object when specific plan is Opened. could you help me?
