AutoCompleteSaveForm Method

Internet Development Index

Saves the specified form in the AutoComplete data store.

Syntax

external.AutoCompleteSaveForm(oForm)

Parameters

oForm Required. Object爐hat specifies a reference to a form element.

Return Value

No return value.

Remarks

Use this method, included in Microsoft® Internet Explorer 5 and later, to store input type=text and input type=password values to AutoComplete data storage. Once information is entered in a form and saved to AutoComplete storage, whenever a user visits a Web site and starts typing in a field with the same name as a stored field, the AUTOCOMPLETE attribute provides an AutoComplete box containing a list of previously stored data.

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

This method is not supported in HTML Applications (HTAs).

Example

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

<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 Microsoft® Internet Explorer 5 or later. Click the following icon to install the latest version. Then reload this page to view the sample.

Standards Information

There is no public standard that applies to this method.

Applies To

external

See Also

Using AutoComplete in HTML Forms