How to create an html look up field. So, I want to achieve
- an html input field, with an icon/button next to it
- when user click on it, a pop-up window displays with a search form (I assume this can be created beforehand and hide using javascript)
- user apply search, and data is displayed in the same (pop-up) window
- when user select a value and apply ok, the field value is copied to the original input filed, and pop-up window closes.
Any sample code? Is there any simple way without using any java script library? or any simple plugin for jquery.
thanks.
It would be possible, but very unwise to do this without any libraries or plug-ins.
I strongly recommend jQuery UI’s Dialog widget. It’s very simple, well documented and easy to use.
You will probably be interested specifically in how to use the Dialog to display a form. Click the View Source link on that page to see all of the mark-up and code required to achieve that effect.