Forum Moderators: phranque
function newpage() {
history.go(-2);
window.location.reload();
}
This works fine in IE6, but not in Netscape - it just sits there and looks at me when I click on the button. Here is the calling code:
<a onclick="newpage()" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image41','','../../../Images/Directory_Buttons/Delete_another_down.gif',1)"><img src="../../../Images/Directory_Buttons/Delete_another_up.gif" title="Delete another record" name="Image41" width="208" height="38" border="0" id="Image41"></img></a> <br>
I have tried to use this: window.location.reload(force);, and the page loads correctly, but it is not refreshed - I have to manually refresh to get the current page. Without the word "force", this works fine in IE6.
Any ideas why this will not work correctly in Netscape7?
thank you,
Bob
If your server has PHP, copy/paste this into a new php page to your server:
<?php
?>
<HTML>
<HEAD>
<TITLE>reload test</TITLE>
<script language="JavaScript" type="text/javascript">
<!--
function reloadpage() {
window.location.reload(true);
}
// -->
</script>
</HEAD>
<BODY>
<?
$l = 8;
for(;strlen($s)<=$l;$s.=chr(rand($a=ord('A'),ord('Z'))+ rand()%2*(ord('a')-$a)));
echo "New Random Number: $s";
?>
<br>Reload this <a href="javascript:reloadpage()">page</a>.
</BODY>
</HTML>
Access the page; click the reload link. Should work. If you don't do PHP, then just strip that out and save as an html page ... harder to see a relaod, but it's there nonetheless.