JQuery Auto Complete question

JQuery Auto Complete question

I have implemented jquery autocomplete successfully in my asp.net application with WebService. 
I am also on dom ready binding hyperlink click event with popup window without querystring as follows 

  1. $(".cmpID").unbind("click").bind("click", function () {
  2.              window.showModalDialog("company.aspx?m=E&id=" + ui.item.id, "Company", "dialogWidth:525px;location:no;status:no;dialogHeight:380px;resizable:no;scroll:no;modal=yes"); return false;
  3.             });
and on select event of autocomplete I am unbind that hyperlink and again bind that hyperlink with selected value of autocomplete on click with popup with querystring as follows

  1. $(".cmpID").unbind("click").bind("click", function () {
  2.               window.showModalDialog("company.aspx?m=I" + ui.item.id, "Company", "dialogWidth:525px;location:no;status:no;dialogHeight:380px;resizable:no;scroll:no;modal=yes"); return false;
  3.             });

Now some kind of need arise like when there is no data in the autocomplete user will open popup window and add data into the database.

Now my question is there any way like when user close that popup window autocomplete will select added data and bind my hyperlink on click event as I mention above