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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T00:23:53+00:00 2026-05-26T00:23:53+00:00

On my index.php I have a header, sidebar, footer and the main part of

  • 0

On my index.php I have a header, sidebar, footer and the main part of it is the <div id="feed"> that loads engine.php every 6000 ms.

I have a Contact page ( contact.php ) in my sidebar. Instead of copying my index.php to a new page, with header, sidebar, footer and a main div for the contact content, can I load it in the #feed div of index.php withour refreshing the site in the browser?

To summarize it, my question is, is there any way that my pages to be loaded on the same div ( #feed) without refresh and freeze the setTimeout timer?

When the user click back on Home, then the engine.php is loaded and reloaded every 6 seconds.

Maybe this can be done with Ajax, I don’t know…

Thank you for this and any examples/codes are highly appreciated.

<script language="JavaScript">
$(function () {
    function loadfeed() {
        $('#feed')
            .addClass('loading')
            .load('engine.php', function () {
                $(this).removeClass('loading');
                setTimeout(loadfeed, 6000);
        });
    }

    loadfeed();
});
</script>

Update

Having something like this works, but the engine.php loads after 6 sec.

$("#contactBtn").click(function() {
  $("#feed").load('contact.php');
});
  • 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-26T00:23:54+00:00Added an answer on May 26, 2026 at 12:23 am

    I have no way of fully testing this, but you try something like this.

    <script language="JavaScript">
    var timerID;
    
    $(function () {
        function loadfeed() {
            $('#feed')
                .addClass('loading')
                .load('engine.php', function () {
                    $(this).removeClass('loading');
                    timerID = setTimeout(loadfeed, 6000);
            });
        }
    
        $("#contactBtn").click(function() {
            clearTimeout(timerID);
            $("#feed").load('contact.php');
            $("#feedBtn").bind('click', loadfeed);
        });
    
        loadfeed();
    });
    </script>
    

    The key here is the use of a global timerID variable and the clearTimeout() function.

    If this works, you can include a Return to feeds button with id="feedBtn" in contact.php, but you’ll have to bind the loadfeed function to the button’s click event after loading it.

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

Sidebar

Related Questions

I have a index.php page that is the main page. All pages are included
I have developed a wordpress theme with header, footer, sidebar, index, page, single and
I have my index.php page and just afrer my header i want to include
Assume that I have 2 .php files : index.php and ajax.php This is index.php:
I have a PHP script (index.php) that includes an index.html file in a sub-directory
I have a page index.php that uses a modal to upload files. After those
I have a index.php file which loads (require) 2 different files based on a
I've created a Display object that contains the header, sidebar and footer: class Display
I have header.php and footer.php files which I include in all of my pages.
for example if in my index.php i have something like: <?php header('Location: /mypublicsite/index.php'); ?>

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.