Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9045755
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T11:25:58+00:00 2026-06-16T11:25:58+00:00

I have Html Layout Similar to this : Parent Page > iFrame I want

  • 0

I have Html Layout Similar to this :

Parent Page > iFrame

I want to write dynamic iframe & content so the layout should look similar to this :

Parent > iFrame > Write New iFrame & It’s Content

I’m able to write html content for child iframe using this code

Parent Page > iFrame > Hello World!

var ifrm = document.getElementById('myIframe');
ifrm = (ifrm.contentWindow) ? ifrm.contentWindow : (ifrm.contentDocument.document) ? ifrm.contentDocument.document : ifrm.contentDocument;
ifrm.document.open();
ifrm.document.write('Hello World!');
ifrm.document.close();

but How can I write same content inside :

Parent Page > iFrame > iFrame > Hello World ?

All iFrames are on same Domain.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T11:26:00+00:00Added an answer on June 16, 2026 at 11:26 am
    var ifrm = document.getElementById('myIframe');
    ifrm = (ifrm.contentWindow) ? ifrm.contentWindow : (ifrm.contentDocument.document) ? ifrm.contentDocument.document : ifrm.contentDocument;
    var childfrm = ifrm.document.createElement('iframe');
    childfrm.id = 'myChildIframe'; // repeat for any other properties you need
    ifrm.document.body.appendChild(childfrm); // or use insertBefore to add it somewhere specific within the DOM
    var childwin = (childfrm.contentWindow) ? childfrm.contentWindow : (childfrm.contentDocument.document) ? childfrm.contentDocument.document : childfrm.contentDocument;
    childwin.document.open();
    childwin.document.write('Hello World!');
    childwin.document.close();
    

    (This is untested, but I think it’ll work)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a view file like this : <html> <head> <meta name=layout content=main />
I have a system that takes dynamic data, puts it in HTML for layout
I have this code snippet in an email layout: <div> <?php echo $this->Html->image('Layouts/default/Logo.png', array(
Suppose I have a hypothetical html layout such as this (while hypothetical, I'm implementing
Every page in my site should have some of the same data, similar to
I have a quite complicated HTML/CSS layout which I would like to convert to
I have created a simple layout using the HTML div tag. I would like
I have a border layout in ExtJS, The north region contains some HTML, but
i have html elements <ul> <li> <dl class=details clear> <dt>TIME&nbsp;:&nbsp;&nbsp;&nbsp;</dt> <dd>09:00:00-10:00:00</dd> <dt>Availible&nbsp;Days&nbsp;:&nbsp;&nbsp;</dt> <dd>monday,tuesday,wednesday</dd> <dt></dt>
I have HTML like this: <article> <header> <hgroup> <h1>Wk 25 </h1> <h2>(18-06 tot 24-06)</h2>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.