The following code calls the function that exists in the main window from the iframe window
Code:
if(typeof parent.window !== 'undefined' && typeof parent.window.functionName === 'function'){
functionName(); //Call the function only if it exists
}
The following code calls the function that exists in the iframe window from the main window
Code:
if(typeof document.frames['iframeName'] !== 'undefined' && typeof document.frames['iframeName'].functionName === 'function'){
document.frames['iframeName'].functionName(); //Call the function available in the iframe window from the parent window.
}
Please note that here the functionName can be replaced with the function names that you want to access. I've used a dummy name like this to convey the idea.
Hope this helps.
Bookmarks