PDA

View Full Version : HTML page on local network


ICS-GS
01 Oct 07, 03:13 PM
I don’t know if anyone else has tried this, or something similar.

I am by no means a HTML or networking expert, but I do know my way around some of this to an extent.

I have a software package which catalogues my photos. One of its features is that it can create a web page slideshow of selected photos.

It scales down the images (I have set it to less than 640*480) and creates a .html file (say index.html) in the target folder (say c:\CTC Screen saver). It also creates two sub folders \CTC Screen saver\images and \CTC Screen saver\webimages. The \images folder contains all the scaled down photos, in jepg format and the \webimages contains some icons for the slideshow control (play, pause, next, previous) again in .jpeg format.

When I click on the index.html file, it opens my browser and everything is fine. I can also navigate to it from any other PC on the (local) network, again it works fine.

So I thought, my colour touch screen supports displaying html images, this might just work… I will be able to display a slideshow on my timeout page without having to load all the images onto a dummy page. (and also not consume any additional space on the flashcard), not only that but I could make up several slideshows, and as required change the filenames to index.html, as required, and not have to alter the software every time. And as this computer is hardly ever turned off there should be no worries…

Well I did just that, grabbed out my laptop, created a new page in my PICED file, set it as the timeout page, selected a new html image, hit browse, found the target URL or file ( \\computer x\c\CTC screen saver\index.html ) over the network, clicked OK, and everything worked. The preview in PICED was exactly how I thought it should be.

So I went to transferred the project to my touch screen, with no problems so far, when the screen started up and the timeout page loaded the ‘dynamic’ text, “showing slide x of y” was OK and incremented at every interval. But all the images were just showing a big red x in place of the images. I went back to PICED, and sure enough it was now doing the same. So I double clicked on the html image, and found the target had changed to C:\clipsal\piced\projects\myhouse\index.html, So I checked inside the project directory and sure enough, an exact copy of index.html was there, so I changed it back to the network address, compiled it again, the same thing happened again.

My next though was to look over the html code, the references it was making were in the shortened format (i.e.: \images) so I changed them to include the full path \\computer x\c\CTC screen saver\images\filename. Some slightly better success, the preview still worked in PICED after compile time, but after loading to the screen, again big red X symbols.

Is there something that I am missing here, I understand I am not using a ‘www’ type address, but is there a way of stopping PICED from copying the html file in its entirety to the PICED project directory, and just referring to the network folder?

Or is there something else that I am missing, can the CTC not resolve the computer name, do I need to set the PC up with a static IP address and point to that? Do I need some sort of server software?

Once I get this working. I would like to post it here as I am sure others would like the same sort of thing on their systems.

Thanks

Grant

Richo
01 Oct 07, 03:29 PM
Sounds like Piced is being too smart and thinking since you are using file access instead of HTTP that it should copy the files.

The simplest solution would be to run a webserver on your photo hosting pc and then access the pc via HTTP like any other website. XP has Microsofts Internet Information Server (IIS) built in (may need to install from the XP CD) or you could use any one of a number of lighter weight webservers available.

ICS-GS
01 Oct 07, 03:42 PM
Thanks Richo, does the touch screen need this also?

So if i have this right i would just be putting a 'HTTP:" infront of the address i was referring to earlier?

Richo
01 Oct 07, 08:52 PM
Thanks Richo, does the touch screen need this also?

No, the touchscreen supports HTTP web access natively.

So if i have this right i would just be putting a 'HTTP:" infront of the address i was referring to earlier?
I use Linux for all server stuff and haven't used IIS for a few years. However, the url will be different. When you turn on IIS it will have a webroot directory ( c:\webroot ?) that it uses to serve pages from so you could move the files to c:\webroot\ctc_screen_saver\index.html

(note: computer names can't have spaces so we will use computerx)

then from a web browser on your private network goto http://computerx/ctc_screen_saver\index.html (http://computerx/ctc_screen_saver%5Cindex.html)

If the browser can't find computerx (this can be hit and miss depending on various aspects of network configuration) use the IP address instead. Don't forget to let IIS through your firewall if you have one running.

ICS-GS
02 Oct 07, 08:37 AM
Its all up and running, once you understand how IIS works.

I use Linux for all server stuff and haven't used IIS for a few years. However, the url will be different. When you turn on IIS it will have a webroot directory ( c:\webroot ?) that it uses to serve pages from so you could move the files to c:\webroot\ctc_screen_saver\index.html.
Linux would be nice, but at this stage i cant seem to find time to have a look at it. I have the old PC sitting there waiting, but...

Just for others who may be looking to do this. The directory structure is actually C:\Inetpub\wwwroot\{filename.htm}





(note: computer names can't have spaces so we will use computerx)

then from a web browser on your private network goto http://computerx/ctc_screen_saver\index.html (http://computerx/ctc_screen_saver%5Cindex.html)

If the browser can't find computerx (this can be hit and miss depending on various aspects of network configuration) use the IP address instead. Don't forget to let IIS through your firewall if you have one running.

Found it first up, no worries.

And another little trick i seemed to have stumbled accross is that after running it once (on the screen), when i disconnect the touch screen or the server PC from the network, it seems to have loaded the info into a cache file somewhere, so the slideshow keeps running (no red x's). I don't know if this is a fluke. Am going to try creating a few more slideshows later today, and change the index.htm file to one of the new ones. Have to wait and see what happens then.

Richo
02 Oct 07, 11:01 AM
Its all up and running

great stuff.

ICS-GS
09 Oct 07, 09:21 AM
And another little trick i seemed to have stumbled accross is that after running it once (on the screen), when i disconnect the touch screen or the server PC from the network, it seems to have loaded the info into a cache file somewhere, so the slideshow keeps running (no red x's). I don't know if this is a fluke. Am going to try creating a few more slideshows later today, and change the index.htm file to one of the new ones. Have to wait and see what happens then.

It seems that the screen may cache some of the information, and due to a loss of the link (through powering down the router or the host PC) the screen will not attempt to refresh the connection, and yes i have checked the refresh button, and set the update time to 600 seconds.

Even with a continual network connection, and the host PC up, if i replace the index.htm file with a different file (which i have renamed index.htm) i would expect after the refresh time the screen would 're-load' the html file to the screen, but this does not seem to happen.

Any ideas

Thanks

Grant

Richo
09 Oct 07, 09:28 AM
It seems that the screen may cache some of the information, and due to a loss of the link (through powering down the router or the host PC) the screen will not attempt to refresh the connection, and yes i have checked the refresh button, and set the update time to 600 seconds.

Even with a continual network connection, and the host PC up, if i replace the index.htm file with a different file (which i have renamed index.htm) i would expect after the refresh time the screen would 're-load' the html file to the screen, but this does not seem to happen.

Any ideas

Thanks

Grant

Does it refresh if you do a ctrl+refresh (or ctrl+F5)?

also try adding no-cache directives into the head section of the html file as per http://www.codeave.com/html/code.asp?u_log=5080

ashleigh
09 Oct 07, 12:31 PM
You get whatever behaviour Internet Explorer gives you.

Most web browsers do a lot of caching... as Richo suggests, a no cache directive is probably the way to go.

ICS-GS
10 Oct 07, 10:01 AM
Sounds fair. I will give it a try. I have a couple of questions though.

Every time the page launches, is it similar to launcing IE and loading a new page? or ALT+TAB switching of active pages. (i.e Browser launches when CTC is started up.

If this is the case, what is the 'refresh' function for?

Darren
15 Oct 07, 12:40 PM
Every time the page launches, is it similar to launcing IE and loading a new page?
Yes
or ALT+TAB switching of active pages. (i.e Browser launches when CTC is started up.
No

If this is the case, what is the 'refresh' function for?
This is for if you have a web page which changes from time to time, such as a weather forecast.

ICS-GS
16 Oct 07, 01:33 PM
OK, the no cache bit of code in the HTML worked, (well actually you can set a delay, which works really good) .

But if you stretch the HTML page to full screen, to get the biggest image possible, you then cant place a c-bus button over the top, or select a 'page link'.

The only think i have been able to do so far is have a button which runs along the bottom of the screen and lift the HTML page up a bit, so that you can access the page link button.

Is there a possibility that this could be fixed at some stage?

ashleigh
16 Oct 07, 05:27 PM
An HTML page is a component just like any other - and its rendered by Internet explorer.

You can't put things on top of it, because internet explorer is not homegate and has no idea what they mean :(