+ 1

Click counter

Can anyone make a download button and right to download button click counts should be there If I click on download button count should increase

9th Apr 2017, 4:58 AM
Pawan Smy
Pawan Smy - avatar
2 Answers
+ 6
Yes you can put- <button onclick="counter()" name="submit">Submit</button> and define counter() function in javascript taking a variable count that increments whenever function be called (means when user click the button)
9th Apr 2017, 5:18 AM
Sachin Artani
Sachin Artani - avatar
+ 3
As there can be n no. of users working on n different systems on your website. So this can't be handled on client side. You should fetch download count from server every time download is clicked and update accordingly.
9th Apr 2017, 5:13 AM
Ashwani Kumar
Ashwani Kumar - avatar