
- HTML Tutorial
- HTML - Home
- HTML - Overview
- HTML - Basic Tags
- HTML - Elements
- HTML - Attributes
- HTML - Formatting
- HTML - Phrase Tags
- HTML - Meta Tags
- HTML - Comments
- HTML - Images
- HTML - Tables
- HTML - Lists
- HTML - Text Links
- HTML - Image Links
- HTML - Email Links
- HTML - Frames
- HTML - Iframes
- HTML - Blocks
- HTML - Backgrounds
- HTML - Colors
- HTML - Fonts
- HTML - Forms
- HTML - Embed Multimedia
- HTML - Marquees
- HTML - Header
- HTML - Style Sheet
- HTML - Javascript
- HTML - Layouts
- HTML References
- HTML - Tags Reference
- HTML - Attributes Reference
- HTML - Events Reference
- HTML - Fonts Reference
- HTML - ASCII Codes
- ASCII Table Lookup
- HTML - Color Names
- HTML - Entities
- HTML - Fonts Ref
- HTML - Events Ref
- MIME Media Types
- HTML - URL Encoding
- Language ISO Codes
- HTML - Character Encodings
- HTML - Deprecated Tags
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);
- Related Articles
- Cross domain HTML5 iframe issue
- Alternatives to HTML5 iframe srcdoc?
- jQuery parent > child Selector
- Is their any alternative to HTML5 iframe srcdoc?
- How to call a parent window function from an iframe using JavaScript?
- Setting Cross Browser Opacity using CSS
- Best Cross Browser Compatibility Testing Tools
- How to send a cross-document message with HTML?
- Process vs Parent Process vs Child Process
- Parent-Child Interaction Therapy: Meaning And Application
- HTML5 applicationCache vs Browser Cache
- How to call parent constructor in child class in PHP?
- 20 Best Cross Browser Compatibility Testing Tools
- How to check web browser support in HTML5
- How to generate child keys by parent keys in array JavaScript?

Advertisements