AutoCompleteSaveForm Method

MS Office DHTML, HTML & CSS

 
Click to return to the DHTML, HTML & CSS home page    
attachEvent Method     AutoScan Method     DHTML Methods    

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 applicationsInternet Link.

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:
Version data is listed when the mouse hovers over a link, or the link has focus.
external

See Also

autocomplete in html formsInternet Link


Back to topBack to top

Did you find this topic useful? Suggestions for other topics? write us!Internet Link

© 1999 microsoft corporation. all rights reserved. terms of useInternet Link.