Fyrd / purejs-datalist-polyfill

A pure JS (no jQuery required) implementation of the HTML5 datalist element
MIT License
60 stars 41 forks source link

Populating the datalist from a database #6

Open JimT15 opened 6 years ago

JimT15 commented 6 years ago

Hello,

This is just what I need except that I need to populate the options from a database. I'm a seasoned developer but not a Javascript expert so am just wondering whether anyone can give me a few pointers as to how to approach this.

Cheers,

Jim

musicin3d commented 6 years ago

What are you seasoned in? If you're generating the page server-side (eg. through PHP or Java), you could just create an <option> tag for each item (if the datalist isn't too long).

musicin3d commented 6 years ago

Also, this project hasn't been updated in 5 years. There's more activity over here: https://github.com/mfranzke/datalist-polyfill