Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 914
  • Last Modified:

How to reload a document in JavaScript

See attached.

What is the proper Javascript syntax to force a reload of the current window?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
	<title>Tester 2</title>
<script language="javascript">
	function show_where() {
		where = document.referrer;
		jj = where.indexOf("hk");
		if (jj != -1) {
			document.getElementById('clink').href = "tester4.htm";
			document.getElementById('clink').text = "Going to Chinese Site";
		alert("Where we are going " + document.getElementById('clink').href);
		return true;
<body onLoad="show_where();">
<a href="tester3.htm" name="clink">Click here for next</a>

Open in new window

Richard Korts
Richard Korts
1 Solution

Richard KortsAuthor Commented:
Look for next one, that didn't solve my problem (but it did reload the page)

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now