Create Counter everytime you click a box? Think of counting Poll Responses


#1

I need to create a counter for my home page. Everytime you click on 1 of 4 boxes you can see the counter change.
Think of this like a poll where you want to count responses: Yes, No, Unsure, N/A
But the counter can’t zero out when you come back to the page.
I’m so lost!


#2

You will need to use a global variable to track the counter value. Global variables persist across pages for the duration of the web browser session. You can use the default “OnLoadVariable” or create new ones as you need.

The simplest approach would be to add two statements to the OnClick events for each of your 4 boxes (with your counter widget named MyCounter in this example):
Set text on MyCounter equal to [[Target.text + 1]].
Set OnLoadVariable to text on MyCounter.

Then in the OnLoad event of MyCounter add the statement:
Set text on This to value of OnLoadVariable.

You can get fancier with this, such as setting the MyCounter text to 0 if OnLoadVariable is less than or equal to 0, and so forth.

If this isn’t enough help and you’re still confused, you can post your .rp file here and I’d be happy to demonstrate a fix in Axure.