#Help with adding a drop down menu to an input text box -- HTML / JS

1 messages · Page 1 of 1 (latest)

flat python
#

Hey all, so basically I'm trying to build a website to search magic cards as a way to learn how to work with API's, and I have a input text box that records every keystroke, appends it to a string, and send that to the API to get a list of cards matching that string.

What I want to do is as the API send's suggestions back, I want to create a drop down list under the text box with the top like 5 or 10. I could figure out how to add the values to the drop down, I just don't know how to initially make it.

I attached an image from a site called archidekt which shows basically what I'm trying to do.

Any help is appreciated, thank you.

outer moth
#

sometime for WCAG 2.0 you will have a hidden <select> for keyboard
that controls the <ul> behavior