Ajax-based encoding, Pinyin abbreviations, and name fuzzy query input controls

Source: Internet
Author: User

Before going on a business trip, a system on hand needs to use an optional and Recordable input control. In fact, such a control is always needed and is also implemented in other projects, but it is not controlled, so I found out the items in the previous project and encapsulated them in my widgets for future use, because I am not familiar with the encapsulation of server-side controls, therefore, the current control is still very rough, and the applicable scenarios are also very harsh. We need to improve it. Let's talk about the ideas and simple implementations for the moment.

In fact, it is easy to implement. It is a simple input control that can be inherited from the Textbox Control. When the input value is pressed by a key (such as the downstream key) then a result set is displayed based on the input value. The result set includes the encoding, name, and pinyin.

First, we need to implement the input box to get the data source information and take over the arrow key event. In order to achieve the effect, some JavaScript scripts are also required. In order to obtain the data, a data source must be provided.ProgramAnd so on ......

Implementation ideas:

1. A hidden embedded framework and a hiddenfield used to store the selected values are generated when the input box is displayed;

2. After Entering the value and pressing the specified key, use Ajax technology to pass the data source information to the results page;

3. The results page retrieves results from the database based on the obtained information and displays the results in a hidden embedded framework.

Simple experience:

Go to bingge studio to experience the control. By the way, browsers outside IE are not supported currently.

Source code download

PS: Currently, this control is still in the debugging stage, and there are still many problems. Please do not use it in a formal project. Please give us your valuable comments!

Stay tuned to the http://www.oylb.net for subsequent updates to this control!

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.