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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T09:30:09+00:00 2026-06-11T09:30:09+00:00

I want to make counter, which value will be the same for all users.

  • 0

I want to make counter, which value will be the same for all users.

I have json file, which contains data: count = 0.

I want to run function every second which will be doing next:

1.Get value from json file

2.Update counter value

3.Change value in json file

4.Go to 1

Here is what I have now:

var counter = 0;
var myCounter = new flipCounter('counter', {value:counter});//initializing counter
 window.setInterval(function(){
$.getJSON('http://127.0.0.1:3000/counter.json', function(data) {1.taking the data from file
 myCounter.setValue(data.count);//2.Updating counter
 //3.here I need to change value from json file
})
}, 1000);

Can someone help me with point 3( How to change json value from jQuery ) ?

  • 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-11T09:30:10+00:00Added an answer on June 11, 2026 at 9:30 am

    You would need some server-side script to modify the json file for you. You would just hit the script with ajax call and it could update the counter (in file or DB) for you. You don’t want to set the “common” counter values at the client.

    You would need the client to do nothing more than pull an updated count from the server (the server having incremented that count by one when receiving your request). If you expect alot of traffic, you probably don’t want that counter in a flat file, but rather a database or in-memory cache.

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

Sidebar

Related Questions

I have link for example domain.com/de/controler/action?param=value and I want make actionlink to keep same
I have such problem: I want to show counter, which will be changing every
I have a model Shoe and Purchase which users make to buy a shoe.
What I want to do is, to make counter of total entered words which
i want to calculating one row at table counter. i try to make my
I want make a bash script which returns the position of an element from
I have style sheet with a class name changebackgroundcolor i want make change in
I’m trying to make a counter which shows the number of days until we
I have an ArrayList in Java, which contains Objects, these Objects are made of
I try to make a diagram with RGraph(JS). I have a user counter on

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.