
Untitled
By: a guest on
Jul 6th, 2012 | syntax:
None | size: 0.71 KB | hits: 13 | expires: Never
javascript parent and child window
<a href="javascript:void(0);" style="width:100%; height:125%" onclick="window.open('otherExpenses.php','Ratting','width=350,height=550,left=50,top=50,toolbar=1,status=1,');">Open Child</a>
<a href="javascript:void(0);" onclick="post_value()">Close Child</a>
function post_value()
{
opener.document.overHeads.overheadOther.value = document.otherExpenses.TextBox27.value;
opener.document.overHeads.hiddenOther.value = document.otherExpenses.TextBox27.value;
//here I want to call a function from the parent window that updates some field in the parent window.
self.close();
}
//w is the child window
w.document.getElementById('theId').onchange(window.somefunction);