Solved

Looping HTML Code

Posted on 2002-07-06
5
148 Views
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.
0
Comment
Question by:BOBH
[X]
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
5 Comments
 
LVL 44

Accepted Solution

by:
bruintje earned 50 total points
ID: 7133886
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
 
LVL 33

Expert Comment

by:knightEknight
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).
0
 
LVL 44

Expert Comment

by:bruintje
ID: 7134073
learning all the time ;)
0
 

Author Comment

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

Author Comment

by:BOBH
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.

<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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
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…
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…

617 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