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
komathipriyakomathipriya 

Calling Button event from Child page

Hi,

 

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="YAHOO.force.com.hideComment();"reRender="noaction" />

 </div> 

         <div >

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

</div>

  </div>

 

  <script> 

   YAHOO.force.com.hideComment = function() {         

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

   YAHOO.force.com.myDialogC.hide(); 

   }

</script>