Looping HTML Code

Posted on 2002-07-06
Last Modified: 2010-04-09
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.
Question by:BOBH
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
LVL 44

Accepted Solution

bruintje earned 50 total points
ID: 7133886

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

LVL 33

Expert Comment

ID: 7134047
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).
LVL 44

Expert Comment

ID: 7134073
learning all the time ;)

Author Comment

ID: 7135111
Thanks to both of you.  I'll play with these suggestions and be back

Author Comment

ID: 11585605
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.

<Select Name="field name" SIZE=1>                 change SIZE to 4 for selection box


Featured Post

Independent Software Vendors: 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!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this. Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it i…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

710 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question