This element is created by setting the type attribute of the textbox to autocomplete. It is used to create a textbox with a popup containing a list of possible completions for what the user has started to type.
Toolkit applications (such as Firefox) use a different autocomplete mechanism than the Mozilla suite. The example below will create an autocomplete textbox that will search the user's history.
<textbox type="autocomplete" autocompletesearch="history"/>
accesskeylabel attribute for the element.
autocompletepopupid of a popup element used to hold autocomplete results for the element.autocompletesearch New in Thunderbird 2Requires SeaMonkey 1.1nsIAutoCompleteSearch interface. The components are created using the name @mozilla.org/autocomplete/search;1?name= where name is listed in this attribute.search-autocomplete Requires SeaMonkey 2.1places-tag-autocomplete Requires SeaMonkey 2.1mydomain New in Thunderbird 3 Requires SeaMonkey 2.0history Requires SeaMonkey 2.0form-history Requires SeaMonkey 2.0file (Linux only)gloda New in Thunderbird 3addrbook New in Thunderbird 3 Requires SeaMonkey 2.0ldap New in Thunderbird 25 Requires SeaMonkey 2.22autocompletesearchparam New in Thunderbird 2 Requires SeaMonkey 1.1completedefaultindex New in Thunderbird 3 Requires SeaMonkey 2.0true, the best match value will be filled into the textbox as the user types. If set to false or omitted, the value must be selected from the list.completeselectedindextrue, the text in the text field will be autocompleted as the user selects from the popup list.
disableautocomplete New in Thunderbird 3Requires SeaMonkey 2.0true, the autocomplete behavior will be disabled. You might use a script to change this attribute. If false, the default, autocomplete is enabled.disabledcommand event will not fire. In the case of form elements, it will not be submitted. Do not set the attribute to true, as this will suggest you can set it to false to enable the element again, which is not the case.
disabled attribute is allowed only for form controls. Using it with an anchor tag (an <a> link) will have no effect.disabled property which, except for menus and menuitems, is normally preferred to use of the attribute, as it may need to update additional state.enablehistory New in Thunderbird 1Requires SeaMonkey 2.0true, an arrow button will appear on the end of the textbox which, when pressed, will open a dropdown menu of all available results.focusedtrue if the element is focused.forcecomplete New in Thunderbird 3Requires SeaMonkey 2.0true, the textbox will be filled in with the best match when it loses the focus. If false, it will only be filled in when the user selects an item.highlightnonmatches New in Thunderbird 3 Requires SeaMonkey 2.0true, then the autocomplete field will be highlighted when no match has been found.ignoreblurwhilesearching New in Thunderbird 3Requires SeaMonkey 2.0true, blur events are ignored while searching, which means that the autocomplete popup will not disappear.inputtooltiptextmaxlengthmaxrowsminresultsforpopup New in Thunderbird 3Requires SeaMonkey 2.0nomatchtrue if the last search resulted in no matches.An onchange attribute is an event listener to the object for the Event change. A change event is fired in different ways for different XUL Input Elements as listed below:
onchange| TextBox | When Enter key is pressed |
| Radio/Check Box | When the state is changed |
| Select List | When the selected item is changed |
The script context at this point can only access the following things:
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<window
id="findfile-window"
title="Find Files"
orient="horizontal"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script type="text/javascript">
function myFunction(e){
/*
Do something cool here or just say the below
*/
alert(e.target.nodeName);
}
</script>
<textbox id="find-text" onchange="return myFunction(event);"/>
</window>
onsearchbeginonsearchcomplete New in Thunderbird 3Requires SeaMonkey 2.0ontextentered New in Thunderbird 3Requires SeaMonkey 2.0ontextreverted New in Thunderbird 3Requires SeaMonkey 2.0readonlytrue, then the user cannot change the value of the element. However, the value may still be modified by a script.showcommentcolumn New in Thunderbird 3Requires SeaMonkey 2.0true, a comment column appears in the popup. For the URL history, the comment column will contain the page titles associated with each URL. If this attribute is not specified, the comment column doesn't appear.showimagecolumntrue, an image column appears in the popup. There is no default styling of this image, but the class name returned by the results appears in the property list for the column. If this attribute is not specified, the image column doesn't appear.sizetabindextab" key. Elements with a higher tabindex are later in the tab sequence.tabscrolling New in Thunderbird 3Requires SeaMonkey 2.0true, the user may cycle through the results list by pressing the Tab key. If false, the default, the Tab key moves the focus to the next element.timeouttypeautocompletenumberdecimalplaces, min, max, increment, wraparound, hidespinbuttons, and textbox.value.passwordsearchsearchbutton attribute is set to true, the command event is only fired if the user presses the search button or presses the Enter key. You may specify grey text to appear when the search box is empty using the emptytext attribute, and a timeout may be set for the command event using the timeout attribute (defaults to 500).timedtimeout attribute. The command event will fire if the user presses the Enter key. The timed type is deprecated in Gecko 1.9.1 and the search textbox may be used instead.valuemenulist elements, the contents, as visible to the user, are read and set using the Menulist.value syntax. For those elements, setAttribute("value", myValue) and getAttribute("value") do not access or affect the contents displayed to the user.
accessibleTypecompleteDefaultIndex New in Thunderbird 3Requires SeaMonkey 2.0completedefaultindex attribute.controllernsIAutoCompleteControllerdisableAutocompletedisableautocomplete (or disableAutocomplete) attribute.editable true if the element is editable. Autocomplete fields are editable so this property always returns true for those.
forceCompleteforcecomplete (or forceComplete) attribute.highlightNonMatches New in Thunderbird 1 Requires SeaMonkey 1.0highlightnonmatches attribute.ignoreBlurWhileSearchingignoreblurwhilesearching (or ignoreBlurWhileSearching) attribute.inputFieldmaxLengthminResultsForPopupminresultsforpopup (or minResultsForPopup) attribute.popup New in Thunderbird 14 Requires SeaMonkey 2.11popup element that should appear when the user clicks on the textbox.Note: This property is readonly in Thunderbird and SeaMonkey.
popupOpen New in Thunderbird 15 Requires SeaMonkey 2.12searchCount New in Thunderbird 15 Requires SeaMonkey 2.12searchParam New in Thunderbird 15 Requires SeaMonkey 2.12autocompletesearchparam attribute.selectionEndselectionStart property. The value specifies the index of the character after the selection. If this value is equal to the value of the selectionStart property, no text is selected, but the value indicates the position of the caret (cursor) within the textbox.selectionStartselectionEnd property. The value specifies the index of the first selected character.showCommentColumnshowcommentcolumn (or showCommentColumn) attribute.showImageColumnshowimagecolumn attribute.tabScrollingtabscrolling (or tabScrolling) attribute.textLengthtextValue New in Thunderbird 15 Requires SeaMonkey 2.12value property.Note: Setting the value causes an input event to be generated without triggering autocompletion.
typeautocomplete to have an autocomplete textbox.valuevalue attribute. For textbox and user editable menulist elements, the contents, as visible to the user, are read and set using the Textbox.value and Menulist.value syntax.
getSearchAt( index )autocompletesearch attribute.onSearchComplete()onsearchcomplete event handler. You should not call this method yourself.onTextEntered()ontextentered event handler. You should not call this method yourself.onTextReverted()ontextreverted event handler. You should not call this method yourself.select()setSelectionRange( start, end )nsIAccessibleProvider, nsIAutoCompleteInput, nsIDOMXULMenuListElement