How do I limit the text in a textbox to what is in an automcomplete list?

I have a textbox that a user will enter addresses into. It has an autocomplete. How do I limit users to just what is in the autocomplete?

A select list does that.

First, consider what happens when someone doesn’t use scripting. Normally in that case your server-side code will validate the input to see if it matches what is in the database.

with that idea in mind, you can apply exactly the same technique with your autocomplete. If you like you can validate it from the client-side with JavaScript, but before getting to that you’ll need to make sure that your server-side does that validation as a safety measure.

Once the server is all prepared for that, you can then choose to do the same thing with JavaScript to help improve the use experience.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.