Well if lets say the parent window opens a child popup window, then do as following
EDIT :
Your parent page, parent.php
<script>
var Popup;
function popUp()
{
Popup = window.open("child.php", "bpPopup", 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=420,height=300,left = 490,top = 262');
Popup.focus();
}
</script>
<a href="javascript:void(0)" onclick="popUp();">Open child window</a><br />
<a href="javascript:void(0)" onclick="Popup.postToFeed();">Call child window function</a>
First link opens popup window, second link calls the function postToFeed()
in popup window from parent.
Your child popup window, child.php
<script>
function postToFeed(){
alert("Popup function called by parent window");
}
</script>
This function in popup window is called after you click the link in parent window.
Hope This helps!
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…