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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T17:59:17+00:00 2026-05-28T17:59:17+00:00

I want to work on some Live Updates which is rendered in an iframe.

  • 0

I want to work on some Live Updates which is rendered in an iframe. This file called disp.php queries a table “posts” in the database and displays them all from bottom to top. Now when a new entry is added to “posts”, I want it to be reflected real-time.

I could achieve it using

<meta http-equiv="refresh" content="10" />  

in the disp.php. But still the constant feel of refreshing is annoying. Now I’m trying to achieve the refresh this way, which doesn’t work.

<!DOCTYPE html> 
<html>
<head>
<title>Live Updates</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js">
</script>
<script> 
function refreshLiveFrame() {
$('body', window.frames['myliveframe'].document).loadIfModified("disp.php");
setTimeout("refreshLiveFrame()", 1000);
}
$(document).ready(function() {
refreshConsole();
});
</script> 
</head>
<body>
<iframe name="myliveframe" src="disp.php">
</iframe>
</body>
</html>

I need a way for a live asynchronous refresh. Anybody’s got a workaround? 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-28T17:59:18+00:00Added an answer on May 28, 2026 at 5:59 pm
    <!DOCTYPE html> 
    <html>
        <head>
        <title>Live Updates</title>
            <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
            <script type="text/javascript">
                $(document).ready(function()
                {
                    refresh(); // Calling refresh() on document ready
                    window.setInterval("refresh()", 10000); // Calling refresh() every 10 seconds
                });
    
                function refresh()
                {
                    // Asynchonously requesting the content of disp.php
                    $.get('disp.php', function(data)
                    {
                        // This will be executed when you get the response back from the server
                        $('#posts').html(data);
                    });
                }
            </script> 
        </head>
        <body>
            <div id="posts"></div>
        </body>
    </html>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to create a live, checkers-like app, which will work like this: There
I have some tabs using jQuery UI which work just fine, but I want
for some reason jGrowl does not want to work on my IIS 5 (live)
I'm starting work on some simulations using MPI and want to do the programming
I'm doing some work with stats, and want to refactor the following method :
I am a frontend developer who also does some backend work. I want to
We are having some issues getting SharePoint to work as we want it to.
Hi I want to work around a 'bug' in certain RSS-feeds , which use
In FF this border radius doesn't seem to want to work. Editable link here.
I have a problem with the following code, which doesn't want to work in

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.