Domanda

HTML5 introduces new tag datalist, which connected to <input list="datalistID"> provides autocomplete functionality.

Question is - what is the best way to connect this datalist suggestion to MySQL table with high amount of rows (let's say 50K).

È stato utile?

Soluzione

The best way to connect it is via the data attribute or the <datalist> tag which takes any URI or IRI to get the data as XML.

You can then change the URI/IRI based on the input value. And also you should limit your resultset to a useful maximum number of lines, you don't want to transfer megabytes just for auto-complete.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top