I have this button that opens a pop up window: function openAssetSelector(fieldname) { window.open( "connector.php", fieldname, "height = 600, width = 700" ) } <?php echo("<input name='SectionBanner_file' type='text' /> <input onclick=\"openAssetSelector('SectionBanner_file')\";' type='button' value='Browse Server' >"); ?> When clicking on browse server button, a pop up window will open and a link is on the page. When clicking on the link, the parent window's text field box will be filled with the link text: var fieldname = window.top.name; window.top.opener.edit.fieldname.value = linktext; but I have problem as it says window.top.opener.edit has no properties. Can someone help me out? Thanks!