@phpnoviceJan 04.2005 — #Did you want a standard HTML link (i.e.. no JavaScript)? To do that, you'd need server-side code to generate a link to the page, itself, but with a random number attached to the URL to fool the server/client cache into re-retrieving a fresh copy of the page from your site. This number would have to change each time the page is refreshed.
@phpnoviceJan 05.2005 — #[i]Originally posted by ksource [/i]
[B]<script language="javascript">
<!--
function refresh()
{
window.location.reload( false );
}
//-->
</script>[/B][/QUOTE] If you're going to use JavaScript, please note that the [B]false[/B] argument tells the browser, where possible, to reuse the local cached version of the page. As I previously posted, you must specify the [B]true[/B] argument to force the browser to actually send the request to the server for new content.
@The_Little_GuyauthorJan 05.2005 — #I also am using this code to tell it where to place the link. I have to put this into the footer or the header, which one would be better? <i> </i><script> menuAdd = document.getElementsByTagName('td'); for (ma=0;ma<menuAdd.length;ma++){ if (menuAdd[ma].className=='menubg'){ menuAdd[ma].innerHTML+='<a href="tec1.proboards19.com">Refresh</a>'; }} </script>
How would I combine the two codes? <i> </i><head> <script language="javascript"> <!-- function refresh() { window.location.reload( false ); // or true } //--> </script> <noscript> <meta http-equiv="refresh" content="# of sec."> </noscript> </head> <body> <a href="java script:refresh()"> <script language="javascript"> document.write("Refresh Link") </script> </a> </script> </body>
The body and head tag I can't mess with, because the program won't let me, but I can enter things into the headers, and footers, such as html, css and javascript.
The above change most closely duplicates the functionality of clicking the browser's Refresh/Reload button in the toolbar. However, I'm sure you're aware that some surfers keep JavaScript disabled because (among other reasons) of an unreasoning fear of it.