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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T20:35:34+00:00 2026-06-11T20:35:34+00:00

so the code that extracts the div from the iframe is made by @Adil

  • 0

so the code that extracts the div from the iframe is made by @Adil like this:

$(window).load(function () {
        var filteredContents = $('.test').contents().find('.div_iframe').html();
        $('.test').contents().find('body').html(filteredContents);
});

HTML looks like this:

<iframe class="test" width="100%" height="100%" src="/message.html?msjId=268" style="height:100%;width:100%;">
<iframe class="test" width="100%" height="100%" src="/message.html?msjId=260" style="height:100%;width:100%;">

and the tables that should be displayed now, they should be two different tables, but at the moment is the same table for both msjId but duplicated from the first msjId…

Thanks in advance!

UPDATE:

i will explain more so i don’t get close vote what i’m doing is that i have a table in the iframes that i want only to get without any headers or anything so the code above is filtering that to give me exactly that div that contains the table from the iframe and then displays it. my problem is if i have more than one iframe then the table is duplicated from the first iframe with the same info and there’s no loop like foreach…

  • 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-11T20:35:35+00:00Added an answer on June 11, 2026 at 8:35 pm

    When you have more then one elements you can use each to iterate through them, try this.

    <iframe id="frame1" width="100%" height="100%" src="/message.html?msjId=268" style="height:100%;width:100%;">
    <iframe id="frame2" width="100%" height="100%" src="/message.html?msjId=260" style="height:100%;width:100%;">
    
     $(window).load(function () {
         $('.test').each(function(){         
    
           var filteredContents1 = $(this).contents().find('.div_iframe').html();
           $(this).contents().find('body').html(filteredContents1);       
    
         });
    
     });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this code that populates the div with the form input data: var
Our main program is in java but the code that extracts our data from
I've come across code that looks like this: NSURLCache *URLCache = [[NSURLCache alloc] initWithMemoryCapacity:1024
I have this piece of javascript that is working. var footerColour = $.color.extract($(div#one.footer), 'background-color');
My code that I tried is as follows: var dataO = new Object(); dataO.numberId
My code that give long month name instead short name: var monthShortName=$.datepicker.formatDate('MM d, yy',
I have this piece of HTML: <div class=embed> <iframe width=300 height=200 frameborder=0 allowfullscreen= src=http://www.youtube.com/embed/123456></iframe>
I have an embeddeble code of a slide like below. this whole html is
I have the following code snippet from a HTML file: <div id=rwImages_hidden style=display:none;> <img
I need to load JavaScript code (which I don't have control over) from 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.