August 28th, 2002, 03:30 AM
counter to add everytime user clicks on a button
how do i do a jsp program that counts how many times a user clicks on a button???
how do i do a jsp program that adds a number to a generated file every time he clicks on a generate button. eg when the user clicks the first time, the generated file will be named as abc1 but when the user clicks on it the second time, it will change to abc2...
Pls reply asap...
August 29th, 2002, 04:40 AM
First, you need to store your counter somewhere persistent. That means the session object, the request object, or a hidden form field.
With the session: