need a search dialog that opens like datepicker

need a search dialog that opens like datepicker

I am using jquery ui datepicker for selecting dates for multiple form fields by clicking on the relevant form field.  I would like to use the same basic (look and feel) action for multiple userID fields, where clicking on the userID field will open a small dialog which has a field to put in a name search field, a search button driving a php/mysql search and a scrolling search result which is set up so when you select one of the search results it will populate a specified field on the opener with the userid of the selected name, and then close the popup.

I can certainly do this with a normal window.open() popup and a separate search page.  I can also do it using an iframe in a jquery dialog popup but I am having trouble getting the dialog to open where I need it.  I am wondering if there is a more elegant way to do this (eg without the iframe) etc. 

Also, how do I get the jquery dialog to open like datepicker (eg onclick of the form field and adjacent to it, and not just centered on the page)?