Hi,

This function opens a popup which returns an value,
the only problem is that the script should wait till
the focus returns to that page.

function createInternalLink()
{
var retval;
window.open("<?PHP print("URL"); ?>",'selInternalLink','toolbar=no,menubar=no,resizable=no,scrollbars=yes,status=no,titlebar=no,location=no,width=350,height=350');
!-- IT SHOULD WAIT HERE ! --!
idContent.focus();
var sel=idContent.document.selection.createRange();
if ((retval!=null) && (retval!="undefined")) {
sel.pasteHTML(""+retval+"");
sel.select();
}

How can I implement this?
It executes in right away now,
so I should include on return or something like
that, your help is appreciated !