You can see the demo of this here. Lets say we have a window A with the js for the same being ajs.js and window B with the js for it being bjs.js Window B opens within the container of Window A. It contains settings, delimited by a comma. The use of self, top, and parent relates to frames, not open windows. If it is in the body, the script is not available in the global scope. The interface has two parts. onClick event will call function from parent window by using parent variable. Parent page. By passing one of its own objects (e.g. How can i call a window child function in javascript? my doubt is whether there is no sync like before the window gets open and all things are written, the remaining TIme is getting called.. lots of confusion That makes it safe for users. window.onunload = function (e) {. opener.CallParentfunction (); }; . The window that wants to send a message calls postMessage method of the receiving window. I am new to Javascript,I am trying to pass user data from a parent window to a child window. Each window has a window.name, and here we can specify which window to use for the popup. It identifies the parent through window.opener and sends a message through postMessage(). WHn you open a child window it shows you an alert box with the text value from the parent window. So the value we enter in a child window we can pass to main by using opener.document object model. We can control the width, height and location ( alignment from top left corner of the screen ) of the small window from the main window. The objective here is to call a function defined in parent class with the help of child class. Naresh Talluri. The javascript you want to call from the child iframe needs to be in the head of the parent. It allows a window from john-smith.com to talk to gmail.com and exchange information, but only if they both agree and call corresponding JavaScript functions. Read the article for more detail, but that should get you going. params The configuration string for the new window. The window will get opened by using the iframe, and the communication could be done with the parent window from the child window. It can call a function in the parent in the form window.opener.function_name() The parent code has the function that the child is calling : You can see the demo of this here. Change Size of Iframe Automatically to Fit Content & Prevent Scrollbars, The parent page can communicate with the child by first saving the handle of the child window (the return value from. Hi All, I'm having issue with calling child window function from parent window. And... if so, why? Unable to call child window functions from parent window . (Never would have imagined setting up a table to refresh would be so hard!) Calling Function of Parent Window in Child Window: