Jump to content

Counter?


aspquestions
 Share

Recommended Posts

How do I count the number of times a button is being clicked. NOTE: everytime the button is clicked it causes the form to postback.I was going to use a hidden text box.. function increment(){ document.getElementByID("count").value = document.getElementByID("count").value + 1;}<input type="hidden" name="count" value = <%value%><...button onclick = "increment()">But I get an error because the value of the text box is null at first. How do I solve this?Note these are the most important lines of my code.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...