Open a dialog by activating a text field.

Open a dialog by activating a text field.


Hi,
I look for a way to open a jQuery Dialog by activating a text field.
(Inside the Dialog you should be able click on a picture and while the
dialog closes, data relating to the picture is insert into the text
field.)
In the end it should look and behave similar to the jQuery Datepicker.
Can someone help me with this?