Question
· Oct 25

if statement in JS not working!

Hi guys,

 

Strange that Horizontal in my below code is "Z" but the i(Horizontal=='Z') is actually not recognizing it and does execute the rest of the code !? 

(Horizontal,Vertical)=""
Set Horizontal= ..GetSensorInfo($P(Temp))
&js< var Horizontal='#(Horizontal)#';
   alert(Sensor+"="+Horizontal)
  if (Horizontal=='Z')
  {
    alert(Sensor+"=2"+Horizontal)          

 document.getElementById('Z'+i).value='H'
  }

 

Thanks

Product version: Ensemble 2018.1
Discussion (1)1
Log in or sign up to continue