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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T03:47:59+00:00 2026-05-24T03:47:59+00:00

What’s the best way to reload a tree navigation iframe from within the HTML

  • 0

What’s the best way to reload a tree navigation iframe from within the HTML page containing that tree and from within the content area iframe?

The tree navigation iframe is defined in favorites.php (HTML page) like this.

<iframe id="tnav" src="loadtreeb.php" style="border: 0px; width: 200px; height: 86%; overflow: auto;">
</iframe>

If nodes are added to the tree, there is a button in the HTML page to save the updates by calling savepages.php. That php file is loaded into the content iframe.

<FORM name="pagesform" action="savepages.php" method="post">
  <P style="font:12px Arial, Verdana;" > 
    Add one line for each page in this format: Page Name, Folder Name, http://thepage.com <br/>
    <textarea name="newpages" rows="23" style="width:780px;"></textarea> <br/>
    <input type="submit" value="Save Page(s)" style="margin-top: 5px;"/>
  </P>
</FORM> 

I reload the tree from within savepages.php (content iframe) like this.

<script type="text/javascript">
    $(document).ready(function() { 
        $('#tnav', window.parent.document).attr('src','loadtreeb.php');
    });
</script>

There are other actions performed from the HTML page that also reload the iframe from javascript. Here is one situation, a delete item button which calls a javascript function defined in the page script.

    <div id="update">
       <img src="treeico/delete.gif" style="cursor: pointer;" title="Delete" onclick="deleteitem();" />
    </div>

function deleteitem()
{
     //perform delete action

     //reload tree
     $('#tnav').attr('src','loadtreeb.php');    
}

Neither call to .attr(‘src’,’loadtreeb.php’) reloads the tree navigation, not

$('#tnav', window.parent.document).attr('src','loadtreeb.php'),

and not

$('#tnav').attr('src','loadtreeb.php').

There must be an issue with getting to the #tnav. What could be the problem? I thought that adding the location window.parent.document to locate #tnav was the right way to reload the tree navigation from within the content area iframe. Whereas omitting the location was the right way to reload from within the HTML page script.

  1. Are there other issues that I had not thought about?
  2. Is caching an issue?
  3. How do I prevent caching for the tree navigation iframe?

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-05-24T03:47:59+00:00Added an answer on May 24, 2026 at 3:47 am

    Caching seemed to be the problem. Adding this to the iframe page header fixed the problem.

    <meta http-Equiv="Cache-Control" Content="no-cache">
    <meta http-Equiv="Pragma" Content="no-cache">
    <meta http-Equiv="Expires" Content="0">
    

    Googled and found that answer here http://www.webdeveloper.com/forum/showthread.php?t=64667

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

Sidebar

Related Questions

I have text I am displaying in SIlverlight that is coming from a CMS
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a JSP page retrieving data and when single or double quotes are
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
Does anyone know how can I replace this 2 symbol below from the string
Seemingly simple, but I cannot find anything relevant on the web. What is the
this is what i have right now Drawing an RSS feed into the php,
I have just tried to save a simple *.rtf file with some websites and

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.