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

Q614 How do I force the browser to reload a text file from the server when clicking a link to load it into another frame?

irt.org | Knowledge Base | JavaScript | Redirect | Q614 [ previous next ]

Q614 How do I force the browser to reload a text file from the server when clicking a link to load it into another frame?

Try something like:

<HTML>
<HEAD>
<SCRIPT LANGUAGE="JavaScript"><!--
function updateLink(filename) {
    now = new Date();
    return  filename + '?' + now.getTime();
}
//--></SCRIPT>
</HEAD>

<BODY>

<A HREF="filename1.txt" onClick="this.href=updateLink('filename1.txt')" TARGET="otherFrameName">text link to filename1.txt</A>
<A HREF="filename2.txt" onClick="this.href=updateLink('filename2.txt')" TARGET="otherFrameName">text link to filename2.txt</A>

</BODY>
</HTML>

Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


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