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 8265661
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T04:53:05+00:00 2026-06-08T04:53:05+00:00

iframe is loaded dynamically into container div inside function. With cc.text(content); I try to

  • 0

iframe is loaded dynamically into container div inside function.

With cc.text(content); I try to update #code content.

I check changed text in runtime, it’s updated but on screen value remains the same.

I am not a javascript pro, so any comments are welcome:

    function ShowEditor(content) {
        var url = "XmlEditor/Editor.htm";
        slHost.css('width', '0%');
        jobPlanContainer.css('display', 'block');
        frame = $('<iframe id="' + jobPlanIFrameID + '" src="' + url + '" class="frame" frameborder="0" />');
        frame.appendTo(jobPlanIFrameContainer);

        $(frame).load(function () {
            var ifr = frame[0];
            var doc = ifr.contentDocument || ifr.contentWindow.document;
            var jdoc = $(doc);
            var cc = jdoc.contents().find("#code");
            // var tst = cc.text();
            // alert(tst);
            cc.text(content);
        });
    }

I get the text in commented code, but fail to update #code content.

iframe holds the following html where I omit details inside head and script:

<!doctype html>
<html>
    <head></head>
<body>
<form>
<textarea id="code" name="code">some texts</textarea>
</form>
</body>
</html>
  • 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-08T04:53:07+00:00Added an answer on June 8, 2026 at 4:53 am

    Your XML editor doesn’t read more than once what’s in the textarea.

    A simple solution would be to generate in javascript the iframe content with the desired textarea content instead of loading it and then try to change the textarea content.

    In fact (depending on the capacities of your XML Editor), you probably can do that directly in a generated text area instead of using a whole iframe to do it.

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

Sidebar

Related Questions

If a website is loaded into an iframe, what code do I need to
I have content loaded into a hidden iframe on a page and I'm wanting
I have an iframe loaded dynamically with jQuery like this jQuery('<iframe id=myFrame src=iframesrc.php></iframe>').load(function(){ //
Coles Notes version: index.php?map_id=foo is loaded into iframe on www.not-my-domain.com. index sets SESSION['map_id'] =
I have a page being loaded in an <iframe> . Inside the <iframe> ,
Is there anyway to unload a page that has been loaded inside an iframe?
I need to dynamically load content from HTML emails into some type of content
I'm building a site and I would like to have external content dynamically loaded
I know that I cannot style the content of an iFrame loaded from another
I have the following pages: default.aspx widgets/rss.aspx The rss.aspx gets dynamically loaded into a

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.