Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 151
  • Last Modified:

Looping HTML Code

I am very new to HTML, but would like to know if there is a way to write a loop into the code as one would do in visual basic.  I have a picture file which is being updated periodicaly and would like to refresh that picture without the need to restart the browser each time.
0
BOBH
Asked:
BOBH
  • 2
  • 2
1 Solution
 
bruintjeCommented:
Hi BOBH,

you can use the refresh tag, in html there's no such thing as looping for that you could use script but i guess that isn't nessecary for what you're trying to do here

http://www.awakemm.com/christopher/knowledge/metatags/refresh.html

HAGD:O)Bruintje
0
 
knightEknightCommented:
or, you could do reload the image without reloading the whole page:

<BODY onLoad='setInterval("document.images[\"yourImageName\"].src=\"images/yourimage.gif?rnd=\"+Math.random()",10000);'>


<IMG name="yourImageName" src="images/yourimage.gif" border="0">

the 10000 in the setInterval is the number of milliseconds to wait for each refresh (10 seconds in this case).
0
 
bruintjeCommented:
learning all the time ;)
0
 
BOBHAuthor Commented:
Thanks to both of you.  I'll play with these suggestions and be back
                                      BobH
0
 
BOBHAuthor Commented:
I have the following code which generates a very nice selection box but now how do I steer the selection to where it is supposed to go when the camera is selected. In this case a different Java Applet for each camera.

<Center>
<Select Name="field name" SIZE=1>                 change SIZE to 4 for selection box
<OPTION>Camera 1</OPTION>
<OPTION>Camera 2</OPTION>
<OPTION>Camera 3</OPTION>
<OPTION>Camera 4</OPTION>

0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now