|
|
![]() |
| Thread Tools | Search this Thread |
#1
| |||
| |||
How to count Button clicks on per page I have a simple page designed where I have a button that is of download some items and a user clicks on the button, but I want to keep count on how many times the user has clicked on the button? how can i show the amount of times a button has been clicked on a textbox? so other visitor will also comes to know about the clicks... |
#2
| |||
| |||
Re: How to count Button clicks on per page I will provide you the simple function which also takes me a very long time to find and implement it, Make a javascript function. Call that function each time the user click on the button. In javascript take a global variable to count the click. eg Code: var count 0; function count_click() { count++; return count; } |
#3
| |||
| |||
Re: How to count Button clicks on per page First, we need to determine what control fired the postback. There are three important things we have to do in the page load. Create a counter text file of the name hitcounter.txt and save it to the same directory you will put your hit counter in. Open your php editor. Save the document as counter.php. Set your opening statement for PHP script.When a button is clicked we need to know which one it is, and so does everyone else because when we make functions to scale the buttons down (actually just scales down the red MovieClip in the button) we don't want to scale down the button that was just clicked. |
#4
| |||
| |||
Re: How to count Button clicks on per page Create a blank text file called hitcount.txt. This will be used to store the number of hits on a page, or across all pages. create the functionality for the other two buttons lets make the scaleButtonsUp and scaleButtonsDown functions because it will become very simple to understand what is happening with only code for one button. Upload this, and CHMOD it to '666' (there should be an option in your FTP program to do this - consult the Help files if you are not sure). |
![]() |
|
Tags: button clicks, download items, page clicks, textbox |
Thread Tools | Search this Thread |
|
![]() | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Why Safari 5.1 relaoding web page while using back button or gesture? | Raj G | Technology & Internet | 2 | 01-03-2012 09:24 PM |
how do I get button click on PHP page? | Ramona19 | Software Development | 7 | 20-06-2011 03:09 AM |
Unable to find my favorites button on IE9 and System moves to IE9 page while installing IE8 | Chopfyt | Technology & Internet | 4 | 15-04-2011 03:46 AM |
Mac OSX error message? INVALID VOLUME FILE COUNT and INVALID VOLUME DIRECTORY COUNT? | Aaghaz | Operating Systems | 6 | 25-02-2011 10:40 AM |
Previous Page button skips back multiple pages on Kindle | Reema_n | Portable Devices | 4 | 19-03-2010 01:50 PM |