[En-Nut-Discussion] Pictures load very slow

Hugo Simon hugo.simon at gmx.de
Sun Jan 8 11:18:43 CET 2006


> But you want to update the images that show the temperature, just not all
No, the image is always the same. There are three images, the scale, a
little black bar and the pointer. All I do is drawing the scale, benath it
the black bar in the width of the current temperature and then the pointer.
So all what changes ist the width parameter. Then there is a colored status
point per sensor which is one of five bitmaps, which are not changing to.

> of them.  Can you use a frame to put the thermometer in its own frame that
> can be updated?
I can do that but there maybe up to 30 such thermometers in a table on one
page. Therefore I would create 30 frames. Don't know if that works, because
every frame has it's own html file and so uses one httpd thread on the
ethernut. Here is the html code of one of such lines:


<TR>
 <TD ALIGN=CENTER><IMG SRC=../graphic/green.gif ALT="green" HEIGHT=16
WIDTH=16 BORDER=0></TD>
 <TD ALIGN=CENTER><FONT SIZE=+1 COLOR="#FFFFCC" FACE="Tahoma, Arial,
Helvetica">test</FONT></TD>
 <TD ALIGN=LEFT>

 <TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 ALIGN=LEFT>
  <TR VALIGN=BOTTOM HEIGHT=18 WIDTH=220>
    <TD><IMG SRC="../graphic/scale40.gif" WIDTH=218 HEIGHT=18 BORDER=0></TD>
  </TR>
  <TR VALIGN=TOP HEIGHT=20>
    <TD><IMG SRC="../graphic/empty.gif" WIDTH=105 HEIGHT=12 BORDER=0><IMG
SRC="../graphic/pointer.gif" WIDTH=7 HEIGHT=12 BORDER=0></TD>
  </TR>
 </TABLE>

 <TD ALIGN=CENTER><FONT SIZE=+1 COLOR="#FFFFCC" FACE="Tahoma, Arial,
Helvetica"> 16.5°C</FONT></TD>
</TR>
> There is a traffic camera around here that updates the image every few
> seconds.
>
> http://www.trafficland.com/findacamera/findacamera.php?city=MDSUB&cam=2240
>
> See how they do it.
They do it with a Javascript that reloads only the picture. Interesting
Idea. It would be cool if I could only change the width parameter, the
status picture and the textfield with the temperature value via Javascript.
But I don't think that this works because these parameters (execpt the
status icon) are strings in the webpage only. I can only access the whole
document not a part of it via Java, I think. But maybe I can reload the
complete webpage text into the document object without reloading the
pictures.

Or can I access the width parameter of the picture object=

But how? I am not a JavaScript Guru.

Thanks anyway
Thorsten




More information about the En-Nut-Discussion mailing list