[Javascript] Refresh an image, change an image

chitra.rudraiah at wipro.com chitra.rudraiah at wipro.com
Fri Jun 11 03:58:50 CDT 2004


Hi,
This problem can be solved if u can implement a slideshow with the delay
of required seconds. But If the images are dynamic i.e if u are not
storing them in the server , then it might be difficult.

Create an array in Javascript ,with the names of the images as
values(i.e  absdd.gif).Now write a function for creating the delay and
another one for the slideshow, with the required delay of seconds. In
the code for <BODY> mention as <BODY OnLoad="start_show()" > Where
"start_show()" is a function for the delay.
Hope this helps.
Let me know if u need the code, I can send it across.

Regards,
Chitra

-----Original Message-----
From: javascript-bounces at LaTech.edu
[mailto:javascript-bounces at LaTech.edu] On Behalf Of Tim Makins
Sent: Thursday, June 10, 2004 9:32 PM
To: [JavaScript List]
Subject: [Javascript] Refresh an image, change an image

1st question:


<meta HTTP-EQUIV="Refresh" content="240">

I am familiar with the above instruction that will refresh my page's
entire
contents every 240 seconds.

but what I am wondering is this: Is it possible to refresh JUST one
image on
the page, such as the one below...

<div id="live_image">
<img src="http://www.company.com/images/live_image.gif" width="741"
height="631" alt="" name="itsalive">
</div>


My reason for asking is that the page has quite a few other images, but
none
of them need refreshing. Loading them all again would slow things down,
and
is really un-necessary.

******************************************
2nd question

Assuming I want to change the above image on the page for a new one on
my
server, (not previously downloaded), such as
http://www.company.com/images/live_image2.gif what would be the code for
a
form-button that would do that ?


Note that pre-loading both images isn't an option as they are generated
on
the server.

Tim in Ireland.


_______________________________________________
Javascript mailing list
Javascript at LaTech.edu
https://lists.LaTech.edu/mailman/listinfo/javascript



More information about the Javascript mailing list