I am trying to make a web page that use the on and off.gif files. I need to put the light bulb on the web page next the on/off
What is the best way to do this in the code below?
I tried the <img............> statment but just get syntax errors
code below:
%> </td>
<td rowspan="12"><%
for count=1 to 16
house_code="E"
if count="6" then
house_code="F"
end if
if count="7" then
house_code ="G"
end if
if count="8" then
house_code="H"
end if
s=hs.DeviceString(house_code +cstr(count))
status1=hs.DeviceStatus(house_code +cstr(count))
if s="" then
if status1="3" then
status1="OFF"
end if
if status1="2" then
status1="ON"
end if
if status1="4" then
status1="DIM"
end if
if status1="17" then
status1="UNKNOWN"
end if
end if
I=hs.DeviceExists(house_code +cstr(count))
response.write "<p> </p>"
if I="-1" then
response.write "space not used"+cstr(s)
else
if s="" then
if status1="OFF" then
' response.write <img src="off.gif" border="0" width="16" height="16" alt="" align="left">
' need to insert the on or off gif file into the web page here
' I get a syntax error with the above
end if
response.write " "+cstr(status1)
else
response.write " "+cstr(s)
end if
end if
next
%> </td>
regards
Ray
What is the best way to do this in the code below?
I tried the <img............> statment but just get syntax errors
code below:
%> </td>
<td rowspan="12"><%
for count=1 to 16
house_code="E"
if count="6" then
house_code="F"
end if
if count="7" then
house_code ="G"
end if
if count="8" then
house_code="H"
end if
s=hs.DeviceString(house_code +cstr(count))
status1=hs.DeviceStatus(house_code +cstr(count))
if s="" then
if status1="3" then
status1="OFF"
end if
if status1="2" then
status1="ON"
end if
if status1="4" then
status1="DIM"
end if
if status1="17" then
status1="UNKNOWN"
end if
end if
I=hs.DeviceExists(house_code +cstr(count))
response.write "<p> </p>"
if I="-1" then
response.write "space not used"+cstr(s)
else
if s="" then
if status1="OFF" then
' response.write <img src="off.gif" border="0" width="16" height="16" alt="" align="left">
' need to insert the on or off gif file into the web page here
' I get a syntax error with the above
end if
response.write " "+cstr(status1)
else
response.write " "+cstr(s)
end if
end if
next
%> </td>
regards
Ray
Comment