Colorbox advice needed

Colorbox advice needed

I have a link to an iframe. The iframe  pops up in a color box. When the user click a button on  the page i call a function called page_close()

when that function is called i need two things to happen.

Two variables firstname , lastname need to be returned to the parent page and the colorbox closed.

I have this functionality working with normal window.open but not with colorboxes.

Can anyone help me out


thanks in advance - code is below
Ilan


/////////////////////////////////CODE/////////////////////
iframe function that is called.

function post_value(){
opener.document.experience.firstname.value = document.getElementById('firstname').innerHTML;
opener.document.experience.lastname.value = document.getElementById('lastname').innerHTML;
self.close();
$.fn.colorbox.close();

}

/////////////////////////////////////////////////////////////////

/////////////////////////////COLOR BOX CODE//////
$(".geo-names").colorbox({width:"50%", height:"80%", iframe:true});

  <a class="get-names" href="temp/get-names.php">Click here</a>

/////////////////////////////////////////////////////////////////