Hi all,
my page that displays my image uploaded from my AirNav had a refresh
of 60 secs http://g0hwc.com/airnav.html (http://g0hwc.com/airnav.html)
This was fine but it was refreshing the whole page and I just wanted
to update the RadarBoxScreenShot.gif image.
I am now using this script.
<img src="airnav/RadarBoxScreenShot.gif" width="960" height="844" border="1" name="refresh">
<script language="JavaScript" type="text/javascript">
<!--
var t = 30 // interval in seconds
image = "airnav/RadarBoxScreenShot.gif" //name of the image
function Start() {
tmp = new Date();
tmp = "?"+tmp.getTime()
document.images["refresh"].src = image+tmp
setTimeout("Start()", t*1000)
}
Start();
// -->
</SCRIPT>
Now only the image is refreshed and not the whole page.
May be handy to some of you.
Paul
Paul - many thanks for this script - it works a treat.
Rod
Paul - Cannot get your links to open.
Andy
Abrad 41, Paul's site is closed down for the next few hours, he is carrying out some maor upgrades & site maintennance works, knowing Paul he will get back to you as soon as he is up & running again.
Hope this helps.
Cheers de Peter 2W1FJZ
Thank you Peter
all sites back up again
Paul
As a non-programmer, I have a request for those of you who understand these things.
Now that I've incorporated the code to refresh the RadarBox screenshot image on my webpage, could somebody whip up some code to display one picture when I'm online, and another picture when the image is, for example, more than two minutes old?
That way I could show the screenshot when I'm online, but a "Currently offline" image when I'm not.
It sounds quite an easy job to me, but, as I say, I know nothing :-)
Rod
Hey G0HWC,
Thanks for this brilliant piece of coding - probably the best little snippet of code I have used in a while.
Makes the update of images so much better than refreshing the whole page.
Thank you.
Cheers,
Quote from: Bell 407 on April 07, 2010, 02:02:39 PM
Hey G0HWC,
Thanks for this brilliant piece of coding - probably the best little snippet of code I have used in a while.
Makes the update of images so much better than refreshing the whole page.
Thank you.
Cheers,
Im glad its of some use to you
Paul
Paul - I'm using it too - many thanks for it.
Has anyone got a solution to the question I asked in reply #6?
Rod
Quote from: RodBearden on April 09, 2010, 09:33:49 PM
Paul - I'm using it too - many thanks for it.
Has anyone got a solution to the question I asked in reply #6?
Rod
Hi Rod,
I dont know a easy way to do this, On my Truckcam site
When I finish work for the day and no more images of the view
from my truck will be uploaded I just use a simple FTP program
to send a "Truckcam" off line image. This is easy as I only need
to do this at the end of every working day..
Paul