How to auto refresh an image within a page
Rather than refreshing the entire page to update an image, it is better to use the embed function and insert an image via a separate HTML page that is set to auto refresh.
Here is how to do it.
Download the attachment to this post and place Image1.html in your Homeseer 2/html/mycontrol folder.
Now open up Image1.html in a text editor such as Notepad.
The page is currently set to refresh every 60 seconds. If you wish to change it, alter the Content="60" to another value (in seconds)
You need to know the height and width of the image that you want to display. Set the width and height of the image to match these values or if you want, change them to make the image bigger or smaller. Take a note of these two parameters. Change the image path to suit your setup and then save the page.
You now need to define a button with the embedded information within the ini file. As an example this will use Table1 Button1.
Button1-1Type=Embed /mycontrol/Image1.html,XXX,YYY
Substitute the XXX for the width of the image that you used and YYY for the height.
That's it. When you call the page, you will see the image but will auto refresh every XX seconds without the main page refreshing.
If you want to have more images auto refresh, just copy Image1.html to Image2.html etc and use as the embedded page.
Rather than refreshing the entire page to update an image, it is better to use the embed function and insert an image via a separate HTML page that is set to auto refresh.
Here is how to do it.
Download the attachment to this post and place Image1.html in your Homeseer 2/html/mycontrol folder.
Now open up Image1.html in a text editor such as Notepad.
The page is currently set to refresh every 60 seconds. If you wish to change it, alter the Content="60" to another value (in seconds)
You need to know the height and width of the image that you want to display. Set the width and height of the image to match these values or if you want, change them to make the image bigger or smaller. Take a note of these two parameters. Change the image path to suit your setup and then save the page.
You now need to define a button with the embedded information within the ini file. As an example this will use Table1 Button1.
Button1-1Type=Embed /mycontrol/Image1.html,XXX,YYY
Substitute the XXX for the width of the image that you used and YYY for the height.
That's it. When you call the page, you will see the image but will auto refresh every XX seconds without the main page refreshing.
If you want to have more images auto refresh, just copy Image1.html to Image2.html etc and use as the embedded page.
Comment