function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Calling Button event from Child page



How to call the OnClick event of the button in the parent page from the child page??


I'm opening a vf page in iframe as popup, in the child i need to keep a button to close the popup and return to paren window. Below is my code.


Now if i click the Cancel button popup will close. How to do the same by Clicking the button in the child page (opened in the iframe).


 <div id="PopUp" style="display: none">     

   <div style="float: right">

<apex:commandLink   value="Cancel"    onclick=";"reRender="noaction" />


         <div >

  <iframe height="313px" src="Childpage"  width="364px" id="commentframe" />




  <script> = function() {         

  document.getElementById("commentframe").setAttribute("src", "");    ;