Click to return to the DHTML, HTML     
attachEvent Method     AutoScan Method     DHTML Methods    
Web Workshop  |  DHTML, HTML & CSS

AutoCompleteSaveForm Method


Saves the specified form in the AutoComplete data store.

Syntax

window.external.AutoCompleteSaveForm(oForm)

Parameters

oFormRequired. Object that specifies a reference to a FORM element.

Return Value

No return value.

Remarks

When a form is submitted to a server, the AutoComplete feature in Microsoft® Internet Explorer 5 saves values for the INPUT type=text and INPUT type=password controls. You must use the AutoCompleteSaveForm method to save these values if a form is submitted through the submit method or is not submitted to a server.

To enable the AutoComplete feature for forms, click Tools, Internet Options, Content, and then AutoComplete. To disable the feature for individual form controls and entire forms, use the AUTOCOMPLETE attribute.

This method is not supported in HTML Applications.

Example

This example uses the AutoCompleteSaveForm method to save the value of a text field without submitting the form to a server.

Sample Code

<SCRIPT>
function fnSaveForm(){
   window.external.AutoCompleteSaveForm(oForm);
   oForm.AutoCompleteTest.value="";
   oForm.AutoCompleteIgnore.value="";
}
</SCRIPT>
<FORM NAME="oForm">

This text is saved:
<INPUT TYPE="text" NAME="AutoCompleteTest">

This text is not saved:
<INPUT TYPE="text" NAME="AutoCompleteIgnore" AUTOCOMPLETE="off">

</FORM>
<INPUT TYPE=button VALUE="Save Value" onclick="fnSaveForm()">
This feature requires Internet Explorer 5 or later. Click the icon below to install the latest version. Then reload this page to view the sample.
Microsoft Internet Explorer

Applies To

[ Object Name ]
PlatformVersion
Win16:
Win32:
Mac:
Unix:
WinCE:
external

See Also

AutoComplete in HTML Forms



Back to topBack to top

Did you find this topic useful? Suggestions for other topics? Write us!

© 1999 Microsoft Corporation. All rights reserved. Terms of use.