Por las dudas te muestro que fue lo que hice:
arme dos htmls uno tiene un formulario llamado form2 con un solo textinput y el html se llama upload y es el que tiene tu codigo tambien con un solo textinput, de la siguiente manera:
Cita: <html>
<head>
<title>Documento sin título</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script>
function f()
{
window.opener.form2.texto1.value = document.form1.imagen1.value;
}
</script>
</head>
<body form onUnload="f()">
<form action="" method="post" name="form2" id="form2">
<p>
<input name="texto1" type="text" id="texto1">
</p>
<p> <input type="submit" name="Submit" value="Enviar">
</p>
</form>
</body>
</html>