FP: How to Create a "Back" Button on a Web Page Using VBScript (168391)



The information in this article applies to:

  • Microsoft FrontPage 97 for Windows with Bonus Pack
  • Microsoft FrontPage for Windows 1.1

This article was previously published under Q168391

For a Microsoft FrontPage 98 version of this article, see 194157.

SUMMARY

This article provides sample HTML code that inserts a control button or a link on a Web page that returns you to the previous document when you click it.

MORE INFORMATION

Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements. The following HTML code adds a control button to a Web page form:
<FORM method="POST" name="VBScript_Nav_Sample">
     <INPUT TYPE="button" NAME="Go Back!"
      VALUE="VBScript_Backup_Sample" LANGUAGE="VBScript"
      OnClick="call window.history.back(1)">
   </FORM>
				
The following HTML code adds a hyperlink that retraces the Web browser's history:
<a href="JavaScript:history.back(1)">the past</a>
				
For more information about writing HTML, visit the following Microsoft Web site:

Modification Type:MajorLast Reviewed:6/18/2005
Keywords:kbinfo KB168391