Ajax Automatic completion tag ()

Source: Internet
Author: User

The Automatic completion function uses Ajax: AutoComplete, which has the following attributes:
VaR: This is an optional attribute that defines the JavaScript Object Name created by the autocomplete tag. You do not need to specify this attribute.
Attachto: This is an optional attribute that defines the automatically completed object that will be applied to the VaR object.
Baseurl: This is a required attribute that defines the URL sent by an Ajax request. The URL specified by this attribute will return the XML response required by a typical ajaxtags. The name value of each item node in the response is automatically provided to the user. This attribute supports Expression Language.
Source: This is a required attribute. Once the value of the HTML element specified by this attribute changes, an Ajax request is sent. Generally, the text of this attribute is used as the prefix for Automatic completion. That is, the text in the HTML element specified by the source element is used as the request parameter and is sent along with the Ajax request, once the request parameter is sent to the baseurl of the server, the server response at the baseurl will return an XML response that meets the conditions. You can also specify other request parameters.
Target: This is a required attribute. This attribute specifies a text box that displays the value corresponding to the automatically completed selection item. If you do not need to use additional text boxes to display value, you can set this parameter to be the same as that of source.
Parameters: This is a required attribute that specifies the request parameters of an Ajax request.
Classname: This is a required attribute that specifies the name of the CSS style sheet that automatically completes the provided drop-down box. Generally, the system provides the CSS style sheet, but you can also customize your own CSS style sheet.
Indicator: This is an optional attribute that specifies an HTML element that appears at the beginning of an Ajax request and is hidden as Ajax interaction completes. This element notifies users of the progress of Ajax interaction.
Minimumcharacters: This is an optional attribute that specifies the minimum number of characters required for Automatic completion. Assume that source specifies a text box. If the value of minimumcharacters is 2, at least two characters are required for the text box specified by source.
Appendseparator: This is an optional attribute. Once this attribute is set, the value of the text box specified by the target attribute will not be overwritten, but the value of the value node automatically completed after it is added, when added, the string specified by the appendseparator attribute is used as the separator.
Prefunction: This is an optional attribute that specifies the functions automatically executed before Ajax interaction.
Postfunction: This is an optional attribute that specifies the function automatically executed after Ajax interaction is complete.
Errorfunction: This is an optional attribute that specifies the function executed when the server responds to an error.
Parser: This is an optional attribute that specifies a server response parser. Generally, you do not need to specify this parser unless you need to complete special work on your own. The default parser is responsehtmlparser.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.