You can access the parent window or the window which opened the new window using the global reference 'opener'.
Keep one hidden field each for the data which you want to pass from the new page to the original page and using the reference of the original page (opener), manipulate the fields of the parent window.
Something like this:
<!-- Parent (ee.html) -->
<html>
<head>
<script>
function go()
{
window.open("dd.html");
}
</script>
</head>
<body>
<form name="frm">
<input type="text" value="Hello" id="txt" name="txt" />
<input type="button" name="btn" id="btn" value="Button" onclick="go();" />
</form>
</body>
</html>
<!-- Child (dd.html) -->
<html>
<head>
<script>
function go()
{
alert(opener.document.frm.txt.value);
}
function change()
{
opener.document.frm.txt.value = "This is changed text";
this.close();
opener.focus();
}
</script>
</head>
<body onload="go();">
<form>
<input type="button" value="Change Value in Parent" id="btn" name="btn" onclick="change();"/>
</form>
</body>
</html>
Last edited by ~s.o.s~ : Jul 14th, 2007 at 3:26 pm.
"I don't accept change. I don't deserve to live."
"Working a real job is a win if you're lazy, greedy, or unmotivated. If you're average, you fit right in. And if you're above average, the basic terms of employment and premise of the arrangement is against your interests."