开发者

html look up field

How to create an html look up field. So, I want to achieve

  1. an html input field, with an icon/button next to it
  2. 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)
  3. user apply search, and data is displayed in the same (pop-up) window
  4. 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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜