Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

Q912 How can I force the reload an image from the server after the image has been displayed, but only once?

irt.org | Knowledge Base | JavaScript | Image | Q912 [ previous next ]

Q912 How can I force the reload an image from the server after the image has been displayed, but only once?

Try the following:

<script language="JavaScript"><!--
var loadedOnce = false;
//--</script>

<a href="/cgi-bin/toggleserver.pl" value="Reload"><img src="/images/server.jpg" onLoad="if (!loadedOnce) this.src='/images/server.jpg?' + (new Date()).getTime()"></a>

Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 6th July 2009. Maintained by: Martin Webb and Michel Plungjan
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2009 irt.org, All Rights Reserved.