In the HTML form, for filling use an element to which a list of 1000 elements is bolted on which the required element is searched. and when searching in this field, this whole list of elements naturally creeps out. Is it possible in any way to limit the size of this drop-down list, say up to 3-5 lines. or to search only when entering 3 characters, I tried to play with the attributes minlength and stuff, but it seems that the tag itself does not support such things. In the depths of my heart, I guess that the solution is not very (it loads the page too much), but for now I’m going out of the knowledge
- oneA list of 1000 items is uncomfortable. can it be better, via ajax, to send to the server a request with values that the user has already entered and to return as many items from the server as needed? - Sergey
- I think it is better, but in the course of training I have chosen this option so far. if you poke your nose on a splint or technology I will be very grateful, in the form of several such fields, I don’t really want to send requests to the server for each field. - Yuri Yakhnitsa
- There is no need to fit under each of the lists. one endpoint is enough where requests with 2 parameters go: the type of your field and the string entered by the user, the array of strings is returned. I would do that. - Sergey
- Thanks for ajax, WE'm only learning (and I don’t know javascript) I will dig in this direction. - Yuri Yakhnitsa
- for a start it is worth being determined on what to attach to the server. node.js, asp, php ... mass options - Sergey
|