Design mode for selecting page

xiaoxiao2021-03-06  63

B / S is inevitably used to select a page: such as selecting a customer, selecting employee, selecting a product, etc. For this, our usual method is to open a new window, there will be the list of the above content, then we check it back Yes, through the use of a period of time, some drawbacks are gradually found:

The pop-up window is very slow frequently for some machines to make customers lose patience. I am very familiar with the content I want to choose. Why do you have a lot of list more and these lists are slow?

It may not be particularly troublesome in our developers, but for testers and customers, it is a big disaster. They have to choose a lot of time he is familiar with. Therefore, I noticed this problem when I started in the new project. I got a better way to pass the test, that is, the way Outlook fills in the email address. Because it is a B / S system, if we need to implement this problem, we must use XMLHTTP to brush a refresh reading record. Not much nonsense, the complete idea is this:

There is a text input box, allowing customers to fill in the selected content, such as he wants to choose the customer, then fill in his customer's help code, XMLHTTP transfers this help code back to the server, execute the query, And return the results in XML to the front end (browser). The front browser is parsed by JS. If there is a unique record, then the correct customer name is submitted to the text box (indicating that the customer exists) is assigned to the text box. If it is multiple records, the text box is hidden, display a drop-down list Operators choose one, and select the contents of the content to obtain the line to the text box, the text box is displayed, the drop-down list is hidden. If there is no record, then a message box is displayed.

Through this treatment, it is good to improve operational efficiency and improve the human humanization of the software.

Below is the code of Demo: