26.09.2019, 17:57
(This post was last modified: 26.09.2019, 18:01 by manos@dynamitec.)
Hello Daniel.
I have done this and works but if I refresh the page the background image is lost. Is there a solution to this?
Thanks for your help.
I have done this and works but if I refresh the page the background image is lost. Is there a solution to this?
Code:
$(function(){
if (typeof grp != 'undefined') {
grp.listen('32/1/4', function(object, state) {
var image = $('.hvac_image')[0]
if (state == 'value') {
if (object.value == 1) {image.innerHTML = '<img src="scada/resources/img/HVACFlowDiagram1.PNG?1569506491">';}
else if (object.value == 2) {image.innerHTML = '<img src="scada/resources/img/HVACFlowDiagram2.PNG?1569506498">';}
else if (object.value == 3) {image.innerHTML = '<img src="scada/resources/img/HVACFlowDiagram3.PNG?1569506503">';}
else if (object.value == 4) {image.innerHTML = '<img src="scada/resources/img/HVACFlowDiagram4.PNG?1569506509">';}
}
});
}
});
Thanks for your help.