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

  • Home
  • SEARCH
  • 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 4023240
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T10:34:28+00:00 2026-05-20T10:34:28+00:00

So I have an Iframe in which I hawe opened a html document with

  • 0

So I have an Iframe in which I hawe opened a html document with header and body. I have html string that I wish to use to replace original Iframes html body. How to do such thing?

  • 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-05-20T10:34:29+00:00Added an answer on May 20, 2026 at 10:34 am

    I believe that something to this affect will do the trick if the iframe is being served from the same domain as the page itself*.

    var html_string = "<p>hello world</p>";
    $('#iFrame').contents().find('#id_to_replace').html(html_string);
    

    *If it’s not, then you are hosed as the browser will prevent access to an iframe of a different domain for security reasons. Though you could also consider piping the content you need in the iframe through your own server and displaying it that way, which would then allow your javascript access to the iframe content, although it’s certainly not the most efficient.

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

Sidebar

Related Questions

I have a page which has an Iframe. In that Iframe, there are six
I have an HTML page (say welcome.html) which contains an iframe to a page
I have a page P1 loading from site S1 which contains an iframe. That
i have an iframe that which source need to be updated and refreshed. the
on my page I have an iframe which is loading an html form from
I have an IFrame inside my 1st page that loads another page which I
I have created an iframe which contains the label, powered by MyWebsite.site The iframe
I have an iframe tab which holds php page with various links inside (like
I have an embedded iframe form which takes a file from a type=file form
I have a question on javascript window management. My application opens an iframe which

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.