Hi to all
How to send a boolean variable (with web server) and in index.htlm work with it?
In practice by the server sending a variable
and based on the value of this, I make visible or hide an image.
Thanks
Ok but in my case it is necessary to modify index.html
In my application I send a string (in you example is the time) and I would also send the boolean value to show or hide an image.
In index.html:
<img border="0" src="image.png" id="IMGS" style="visibility:hidden"/>
...........
how i can capture the boolean value and manage the image display?
Thanks
'change IMGS to imgs, and dim imgs as JQueryElement ,id should in lower-case for b4j;
<img border="0" src="upimg.png" id="imgs" style="display:none"/>
Private imgs as JQueryElement
Sub Timer1_Tick
.........
temperature.SetHtml(t)
If Main.upimg.Visible Then
imgs.SetCSS("display", "none")
Else
imgs.SetCSS("display", "block")
End If
........
'html:
'img: www/upimg.png
<img border="0" src="/upimg.png" id="imgs" style="display:none"/>
'img: in the same folder of the html file
-> src="upimg.png"