AirNav Systems Forum

AirNav Radar => AirNav Radar Discussion => Topic started by: G0HWC on January 26, 2010, 11:07:41 PM

Title: some usefull HTML for your website
Post by: G0HWC on January 26, 2010, 11:07:41 PM
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
Title: Re: some usefull HTML for your website
Post by: RodBearden on March 11, 2010, 01:00:48 AM
Paul - many thanks for this script - it works a treat.

Rod
Title: Re: some usefull HTML for your website
Post by: abrad41 on March 11, 2010, 09:49:41 AM
Paul - Cannot get your links to open.

Andy
Title: Re: some usefull HTML for your website
Post by: peteeds on March 11, 2010, 11:25:34 AM
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
Title: Re: some usefull HTML for your website
Post by: abrad41 on March 11, 2010, 08:12:41 PM
Thank you Peter
Title: Re: some usefull HTML for your website
Post by: G0HWC on March 13, 2010, 12:16:23 AM
all sites back up again

Paul
Title: Re: some usefull HTML for your website
Post by: RodBearden on March 14, 2010, 12:00:43 AM
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
Title: Re: some usefull HTML for your website
Post by: 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,
Title: Re: some usefull HTML for your website
Post by: G0HWC on April 09, 2010, 09:23:29 PM
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
Title: Re: some usefull HTML for your website
Post by: 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
Title: Re: some usefull HTML for your website
Post by: G0HWC on April 10, 2010, 12:22:08 PM
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