Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

FP: Form Fields Are Not Reset When You Go Back to the Form in the Browser


View products that this article applies to.

This article was previously published under Q300449

↑ Back to the top


Symptoms

When you view an HTML page in a Web browser, all fields are set to their default values. When you submit the form, and then click the Back button to view the page again, the form fields still contain the data that you entered.

↑ Back to the top


Cause

This behavior occurs because the Web browser caches the information you entered into the form. Many Web browsers cache this information in case it must reuse it.

↑ Back to the top


Workaround

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. NOTE: You may receive an error message if you copy the examples directly from this article and paste them into FrontPage. The angle brackets (< and >) may appear as escaped HTML code (< and >). To work around this behavior, paste the script into a blank Notepad document, and then copy it from Notepad before you paste it into FrontPage. To work around this functionality, you can clear the form fields by using Dynamic HTML (DHTML). To do this, follow these steps:

  1. In FrontPage, open a server-based Web.
  2. Create a new, blank page.
  3. Insert a form on the page with multiple text fields:
    • In FrontPage 2000
      1. On the Insert menu, point to Form, and then click One-Line Text Box.
      2. On the Insert menu, point to Form, and then click Scrolling Text Box.
    • In FrontPage 2002
      1. On the Insert menu, point to Form, and then click Textbox.
      2. On the Insert menu, point to Form, and then click Text Area.
  4. Right-click the form, and then click Form Properties.
  5. Type MyForm for the form name, and then click OK.
  6. Switch to HTML view. Modify the <BODY> tag specifying the DHTML method to reset the form, like this:
    <BODY onLoad="document.MyForm.reset();">
    					
  7. Switch to Normal view. Save the page to your Web site.
When you submit the form in Microsoft Internet Explorer, and then click the Back button on the confirmation page, you see a blank form.

↑ Back to the top


More information

For more information about compatibility with other browsers, click Microsoft FrontPage Help on the Help menu, type compatibility in the Office Assistant or the Answer Wizard, and then click Search to view the topic.

↑ Back to the top


Keywords: KB300449, kbprb

↑ Back to the top

Article Info
Article ID : 300449
Revision : 4
Created on : 1/31/2007
Published on : 1/31/2007
Exists online : False
Views : 285