I am calling the parent function like window.parent.functionname(); from the child page. How can i call the window.child.function() from the parent page to child page.
Any help is appreciated.
Do you have an iframe?
Do something like that:
window.frames[0].contentDocument.functionname();
tabbar.setHrefMode("iframes-on-demand"); tabbar.setContentHref("a1", "../../MailContactMain/Index"); then will i use a1 as iframeParent page
var windowRef = null;
function openChildWindow() {
if ((windowRef != null) && (windowRef.closed == false)) {
if (windowRef.closed == false) windowRef.close();
windowRef = null;
}
var windowUrl = 'ChildPage.aspx';
var windowId = 'NewWindow_' + new Date().getTime();
var windowFeatures = 'channelmode=no,directories=no,fullscreen=no,' + 'location=no,dependent=yes,menubar=no,resizable=no,scrollbars=yes,' + 'status=no,toolbar=no,titlebar=no,' + 'left=0,top=0,width=400px,height=200px';
windowRef = window.open(windowUrl, windowId, windowFeatures);
windowRef.focus();
// Need to call on a delay to allow
// the child window to fully load...
window.setTimeout(callChildWindowFunction(), 1000);
}
function callChildWindowFunction() {
if ((windowRef != null) && (windowRef.closed == false)) windowRef.childWindowFunction();
}
Child Page
function childWindowFunction() {
alert('Hello from childWindowFunction()');
}
window.parentand it's working, then you have an iframe.tabbar.setHrefMode("iframes-on-demand"); tabbar.setContentHref("a1", "../../MailContactMain/Index");Then can i call using a1 id