Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org
#

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?

You are here: irt.org | FAQ | JavaScript | Redirect | Q614 [ previous next ]

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>

©2018 Martin Webb