 
  Data Structure Data Structure
 Networking Networking
 RDBMS RDBMS
 Operating System Operating System
 Java Java
 MS Excel MS Excel
 iOS iOS
 HTML HTML
 CSS CSS
 Android Android
 Python Python
 C Programming C Programming
 C++ C++
 C# C#
 MongoDB MongoDB
 MySQL MySQL
 Javascript Javascript
 PHP PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
HTML5 Cross Browser iframe post message - child to parent?
The parent object provides a reference to the main window from the child.
The following is the parent code. The directive below triggers the iFrame to send a message to the parent window every 3 seconds. No initial message from the main window needed!
var a= window.addEventListener ? "addEventListener" : "attachEvent";// here a is the event method var b= window[a];// here b is the eventer var c= a== "attachEvent" ? "onmessage" : "message";// here c is the message event // Listen to message from child window b (c,function(e) {    var d= e.message ? "message" : "data";// here d is the key    var f= e[d];//here f is data },false);Advertisements
 