Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
4
rated 0 times [  5] [ 1]  / answers: 1 / hits: 28224  / 12 Years ago, wed, december 19, 2012, 12:00:00

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.


More From » frames

 Answers
11

Give your iFrame an id and try



document.getElementById(iFrameId).contentWindow.functionname()


This works even when you have multiple iFrames in the same page irrespective of their order.


[#81328] Tuesday, December 18, 2012, 12 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
martina

Total Points: 101
Total Questions: 103
Total Answers: 111

Location: Seychelles
Member since Mon, Jun 28, 2021
3 Years ago
;