I am working on this for my website - but am stuck!
- please help if you can.
On hitting a link a new window opens.
I then run a script in it and then have a form.
The form is supposed to close that child window and bring me back to the parent / opener window and run a script in it.
I put this in the parent / opener window:
and then this is the link that opens the child window:
window.name = "oldwin";
In the child window:
<a href='$Ad_detail' target='_blank' onclick=\"window.open (this.href, '$Ad_detail', 'height=800,width=960,scrollbars'); return false\" ><b> $Dtype </b></a>
a script runs and shows a form.
my form (in child window) now says this:
<div style='width:400px;position:absolute;left:600px; top:600px;' >
<form name="suspended" action ="a_run_top.php" method = 'POST' target="oldwin" onsubmit="this.close() window.oldwin.focus();">
<input type="hidden" name="del_ctl" value= "Y" >
<input type="hidden" name="section" value= "<?php echo "$section"; ?>" >
<input type="hidden" name="x_yct" value= "<?php echo "$N_yct"; ?>" >
<input type="hidden" name="x_yct_op" value= "<?php echo "$N_yct_op"; ?>"
<input type="submit" class="btn2" value = "Continue"
But the result is that the script (a_run_top.php) runs in the child window - not in the parent window as I wanted.
I am trying to get the child window closed and the script to run in the parent / opener window.
Any more ideas / corrections ?
Thanks for help.