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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T03:35:36+00:00 2026-06-15T03:35:36+00:00

I am in the process of creating an intranet site that accesses test data

  • 0

I am in the process of creating an intranet site that accesses test data from a database and displays the results back onto a generic HTML webpage.

Right now I have Python setup as cgi and am getting the desired results I need for now. But now there is a request to display some information real-time.

I am new into the world of web programming this way but what is the best way to run a Python script and display the information on the HTML page without reloading.

I know how to get the information on the Python server side and display the information correctly in the HTML side but what I am missing is how I am able to link the two together or call the Python method from the HTML side.

Any suggestions or simple examples would be great.

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-15T03:35:37+00:00Added an answer on June 15, 2026 at 3:35 am

    If you want to reload the whole page, then just add a meta refresh tag to the HTML in the HEAD section:

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

    and the page will be reloaded every 20 seconds.

    If you want to populate an element of the page at regular intervals, and you do not much care for its looks (or can take the time to tweak the subpage’s looks), you can use an IFRAME displaying a sub-page via a second CGI, with a meta refresh in its HTML:

    <iframe class="realtime-data" src="/cgi-bin/realtime.py"></iframe>
    

    Other more flexible cases would also require you to supply a second CGI that would publish the realtime data when called, and poll that CGI from the main page using e.g. jQuery’s load() method:

    setInterval(function() {
        $('#div_where_html_goes').load('/cgi-bin/realtime.py')
    }, 20000); // 20k milliseconds
    

    The above is just a hint, not a good programming practice:

    • there is no provision for loading errors
    • there is no provision for delays and script pile-up
    • the CGI has to supply not only the data but probably also some layout

    …but it should be enough to get you started. Basically, you install jQuery (one line of HTML code if loading from Google), and you supply the init code at the end of the page. There you put the Javascript code:

    <script type="text/javascript">
    // <![CDATA[ <!--
        (function($){
            $(function(){
    
                setInterval(function() {
                    $('#div_where_html_goes').load('/cgi-bin/realtime.py')
                }, 20000); // 20k milliseconds
    
            })
        })(jQuery);
    // --> ]]>
    </script>
    </body>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am in the process of creating a site that i would like to
I'm in the process of creating an Intranet site using Windows Authentication. Maybe I'm
Suppose that a process is creating a mutex in shared memory and locking it
I am in the process of creating an iPhone app that requires to interact
I'm in the process of creating a web service that uses XML to handle
I'm in the process of creating a Facebook app that uses a Page Tab
I'm in the process of creating database scripts for an existing database. I'm trying
In the process of creating a user interface code from UI file Qt creates
I'm in the process of creating a PHP site. It uses multiple PHP classes,
Is there a recommended process for creating reusable ASP.NET assemblies that contain UserControls that

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.