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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T05:06:54+00:00 2026-06-03T05:06:54+00:00

http://pastebin.com/bnMaxjep http://www.vidyasocks.com/index.php See the ticker at the bottom, I want to update that so

  • 0

http://pastebin.com/bnMaxjep

http://www.vidyasocks.com/index.php

See the ticker at the bottom, I want to update that so it shows without having the users refresh the page. I am using ajax to do it.

How do I do it? This is my first time using it.

  • 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-03T05:06:55+00:00Added an answer on June 3, 2026 at 5:06 am

    The main page would go something like this:

    <?php session_start(); 
    
    $_SESSION['visitcount']=0;
    
    ?>
    <script>
    function runcounter()
    {
    if (window.XMLHttpRequest)
      {
    // code for IE7+, Firefox, Chrome, Opera, Safari
      xmlhttp=new XMLHttpRequest();
      }
    else
      {
    // code for IE6, IE5
      xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
      }
    xmlhttp.onreadystatechange=function()
      {
      if (xmlhttp.readyState==4 && xmlhttp.status==200)
        {
        document.getElementById("counterelement").innerHTML=xmlhttp.responseText;
        }
      }
    xmlhttp.open("POST","counter.php",true);
    //may need these:
    var params="id=testdata";
    xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
    xmlhttp.setRequestHeader("Content-length", params.length);
    xmlhttp.setRequestHeader("Connection", "close");
    //need rest
    xmlhttp.send();
    
    setTimeout("runcounter()",1000); //refresh function every second
    
    }
    </script>
    <body onload="runcounter()" >
    
    <div id="counterelement">0</div>
    

    This would update the function (counter) every second and run once on page load as well.

    PHP:

    session_start();
    $_SESSION['visitcount']++;
    echo $_SESSION['visitcount'];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

please see: http://pastebin.com/5za3uCi1 I'm quite new to php and I'm editing the ventrilo status
http://pastebin.com/dttyN3L6 The file that processes the form is called upload.php I have never really
http://pastebin.com/25CwPDB2 <-- Index.php http://pastebin.com/4ZTvy0kk <-- /system/Main.php This seems to happen on both a Windows
HTML/JS Here: http://pastebin.com/JrtfeAtw PHP Here: http://pastebin.com/EcRHCwmY Based on Ajax F1's tutorial here: www.ajaxf1.com/tutorial/ajax-file-upload-tutorial.html Anyway,
http://pastebin.com/PWJvwMF6 http://webdesign4.georgianc.on.ca/~100141468/comp2084/todo/clients/ As you can see that is the error that keeps appearing. I
http://pastebin.com/index/9M2rA8cx that has all my code. You will notice that the two div's are
http://www.roguevalleyroses.com/rose_list.php?search_id=&class=&height=&growth=&color=&bloom_size=&bloom_type=&shade=&fragrance=&disease=&rebloom=&thorns=&zone=&hybridizer=Ashdown%20Roses&date_range=&text=&view=&show=&page=4 This is the page. The code that queries the results is here: http://pastebin.com/d51bfa53f
I have a small sample program http://pastebin.com/5gFkaPgg that serves a REPL to a client
http://pastebin.com/dN9a9xfs That's my code to print out the elements of a binary search tree.
http://pastebin.com/z9r43y0L Try that example, then press the Save button. A red frame around the

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.