Write below function of javascript in your parent window. We will call it later from the child.
<script language="javascript" type="text/javascript">
function ParentWindowFunction()
{
alert(‘Hi, At least someone has called me from the child window’);
return false;
}
</script>
Write the below code in your child window
<script language="javascript" type="text/javascript">
function CallParentWindowFunction()
{
window.opener.ParentWindowFunction();
return false;
}
</script>
You can call above function from a button click event like
<input type="button" name="btn1″ value="Call Parent Window Function" onclick="javascript:return CallParentWindowFunction();"/>
That’s it. Now by clicking on this child window’s button you can call a function resides in parent window.