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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T08:55:53+00:00 2026-06-10T08:55:53+00:00

I would like to transfer some content from (div class=StaffBlock) that loaded from the

  • 0

I would like to transfer some content from (div class=”StaffBlock”) that loaded from the iframe from /index.html into div class=”Contact-Agent-Append”. but my jquery is not working and i dont know why, is it because of im loading it from iframe? Thanks.

<iframe scrolling="no" height="60px" frameborder="0" width="150px" src="/index.html" marginwidth="0px" marginheight="0px" style="overflow:hidden; margin:0; padding:0; display: none;"></iframe>

<script>
$('.StaffBlock').appendTo($('.Contact-Agent-Append'));
</script> 

<div class="Contact-Agent-Append">content should go here
</div>

Question Updated:

this is the content stored in the remote url which contain the StaffBlock:

<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="/StyleSheets/listing-contact.css" />
</head>
<body>
<div class="listing-contact">
<div class="StaffBlock">
<table border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td class="col-a">{tag_name}</td>
    <td class="col-b" rowspan="4">{tag_Staff Photo}</td>
  </tr>
  <tr>
    <td>{tag_job title}</td>
  </tr>
  <tr>
    <td>{tag_mobile}</td>
    </tr>
  <tr>
    <td><a href="mailto:{tag_email}">email me</a></td>
  </tr>
</table>
</div>
</div>

</body>
</html>

and this is the original coding that contain the iframe:

<div class="Contact-Agent-{tag_Publish As Agent}">

    <div class="Contact-Agent-Small-Logo-listing" title="this property is published by agent">
    </div>
    <iframe scrolling="no" height="60px" frameborder="0" width="150px" src="{tag_listing agent staff url}" marginwidth="0px" marginheight="0px" style="overflow:hidden; margin:0; padding:0; display: none;"></iframe>
    <script type='text/javascript'>//<![CDATA[ 
    $(window).load(function(){
    $('iframe').contents().find('.StaffBlock').clone().appendTo($('.Contact-Agent-Append'))‌​‌​
});//]]>  
    </script> 
    <div class="Contact-Agent-Append">1
    </div>

</div>
  • 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-10T08:55:55+00:00Added an answer on June 10, 2026 at 8:55 am

    You have to take into account that you have to wait until both the page and the iframe are ready for DOM manipulation. Using one $(document).ready() is not enough.

    In your case, it seems you can modify the content of your iframe. I’d suggest using the iframe to push data into the main page, instead of getting data from it, it will make sure both are ready.

    You will probably need to load jQuery in your iframe, the great thing is that you can add a parameter to your selectors to change its context. Default is document, but in your case you will need to target the main page from the iframe document.

    Also do not forget that if you want the content of a div, a selector is not enough. Either use its .html() or .clone() it.

    // in your iframe :
    $(document).ready(function()
    {
        $('.Contact-Agent-Append', window.parent.document)
        // or window.parent.$('.Contact-Agent-Append')
            .append( $('.StaffBlock').html() );
    });
    

    You might want to adapt the selector based on your needs, but it will work faster than a setInterval. If at first it doesn’t work try removing jQuery from the mainpage to prevent any conflict, if it solves your issue try using j=jQuery.noConflict();

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

Sidebar

Related Questions

Originally I would like to transfer some content (div class=StaffBlock) which is loaded from
I would like to create a reusable interface to transfer some proprietary information over
I would like to do some stuff in Java that would be clearer if
I would like to move some files to a time-stamped directory after I transfer
I would like to know, wether Server.Transfer will work in a Web Farm. Thanking
Would like to parse IPv4 address from exit-addresses . Format of the file: ExitNode
Would like a for loop in jquery so that: For every hover_link: show hidden
Would like to make anapplication in Java that will not automatically parse parameters used
Would like to know how to hide an div after a set of css3
I would like to store some Application-Related Metadata for Files, and NTFS Alternate Data

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.