+ Start a Discussion

calling script in parent page from the Child page

i'm using YAHOO.widget.Panel with iframe to show a popup window.

below is the script used to do the same.


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


  document.getElementById("cmdframe").setAttribute("src", "");            document.getElementById("mycomment").style.display = "block";            document.getElementById("cmdframe").setAttribute("src", "https://c.ap1.visual.force.com/apex/Sample");     




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

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



Now how to close the iframe from the popup window?if i click a Save button in the popup window, it should do some action and the iframe should closed, without refreshing the parent window.
i want to call YAHOO.force.com.hideComment to close the panel which is in the parent window.



Or is there any way to close the i frame from the loaded child page without referishing the parent page.