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

The Archive Base Latest Questions

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

Is there anyone who can help me with this. I am playing arround with

  • 0

Is there anyone who can help me with this. I am playing arround with one small button project.

I am using css button but lets say an button from here. “example: http://www.cssbuttongenerator.com/“

Now lets say, when someone click on the button it will write below the button 1…
If someone click again it will write 2… No matter who will click. Me, you or someone third. It will count and remember number of clicked times.

Now lets say it counts to 100, so 100 persons can click on it. After that it resets to 0 and start counting clicks again.

It must be possible. Jquery or whatever is required, please help this newb (me).

Even use an input button or an image or whatever… Just to count and remember clicks. Thank you , awaiting for some great answers!

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

    you can make use of cookies set them using javascript and on button click read the value of that cookie
    for more information on manipulating cookies using javascript please go through this.
    Here is also an other link that explains how to store the value in cookies using javascript

    UPDATE

    your solution is possible without cookies too if you don’t want to persist the counter between different request to the page and for a single user
    i made a fiddle please see here
    i hope it will help

    UPDATE 2

    your

    No matter who will click
    

    This is only possible when you are working with any server side technology like asp.net,Java/jsp/PHP because the cookie based solution will not fit your need in that case .if you wish that anyone click and every time is should incereament the counter no matter who clicked it then you have to USE server side Sessions.

    UPDATE

    in jquery onDOMReady meand when the document/page loads completely then only the scripts will run so its error safe way of registering the script with the page
    anyways
    I used jquery styled click handlers for buttons if you are not using jquery then you can simple call count function on button onclick event

    if you are using jquery then you can write it like this

        $(document).ready(function(){
        var x = 0;    
        function resetcounter() {
        x = 0;
        document.getElementById("counting").value = x;
        }
    
       function count() {
       if(x<50)
        {
          x += 1;
        }
        else
        {
            x=0;
        }
        document.getElementById("counting").value = x;
       }
       $('#btn').click(
    
             function() {
             count();
        });
    
        $('#reset').click(
    
        function() {
               resetcounter();
        });  
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

If there's anyone who can help me understand this one, I will be impressed.
Is there anyone who can help me with this problem. Have downloaded and configured
Note : Anyone who can help me properly fix this completely gets the 100
Is their anyone who can help me create this effect: As you see in
Anyone who can help me make this work? array.each_with_index do |buffer,index| if array[index][8] ==
Is there any one who can point me to a Rails 3.2 multilingual starter
Is there anyone who knows this? I have been trying this for the last
Is there anyone who knows how to destroy a javascript (jquery) function? I'm using
I've already noticed that there are many posts dealing with this; but I can't
First, I'd like to thank anyone who can help in advance, I haven't done

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.