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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T07:43:57+00:00 2026-06-06T07:43:57+00:00

This a wordy problem, so I’ll try and be as specific as possible. I

  • 0

This a wordy problem, so I’ll try and be as specific as possible.

I have two wysiwyg text editors held within two separate containers. In a function run on onclick of an <a> tag, one container is slid up and inserted before the other container. This causes the wysiwyg box to completely break, so I remove it and then reinitialize it. The problem I’m having is getting the content within it.

This is the HTML structure of wysiwyg:

    <div class="rightFieldContainer">
        <div class="wysiwyg" style="...">
             <ul class="panel" role="menu">...</ul>
             <div style="clear: both;">...</div>
             <iframe frameborder="0" style="..." tabindex="0">
                 <html xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
                     <head>...</head>
                     <body style="..." class="wysiwyg">
                        <b _moz_dirty="">WHAT I'M TRYING TO GET</b></strike><br>
                     </body>
                 </html>
             <iframe>
          ... (all remaining tags are closed)

The path to the content is my function is specified as such:

     var content = $("#someContainer1").find(".rightFieldContainer").children(" .wysiwyg").children()[2].contentWindow.document.body.innerHTML;

Using innerHTML returns a blank and html returns undefined. What’s more curious is that if I use the same/similar path to get the content of another textbox that is never meant to be moved, it works fine.

I understand that it’s impossible to hope for a clear answer since the problem itself is a little vague, but just an alternative to innerHTML or reasons why it might not work are appreciated. Thanks.

  • 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-06T07:43:59+00:00Added an answer on June 6, 2026 at 7:43 am

    Content in an iframe is not navigable using selectors from the parent document. To get the document for the iframe you need to do:

    $("#someContainer1").find(".rightFieldContainer").children("iframe").contents();
    

    .contents() gets the document for the iframe so you can then find things within it from the parent page, assuming that the contents of the iframe are on the same domain.

    var content = $("#someContainer1").find(".rightFieldContainer").children("iframe").contents().find(".wysiwyg").html();
    

    To simplify this you should give your iframe a class/id and select it directly as such:

    var content = $("#someContainer1").find("#youriframe").contents().find(".wysiwyg").html();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this problem. I read with BufferedReader text from one system file, this
I have this problem that i want to transfer specific ( yet not that
Hello i' ve this problem with unicode emails, when i try to send words
In Programming Pearls I have met the following problem. The question is this: print
This is possible a problem what i lost more time to think how to
I have a textarea #myarea into which I'm typing text. I've typed this text.
I have a interesting problem in Java, its a little wordy though so bear
I'm using a naive approach to this problem, I'm putting the words in a
I'm learning SAS and write this macro: %macro firstMacro(mvLO, OLO); %local Count; %local Wordy;
I will try and word this question the best I can, for it is

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.