Hi,
I am trying to create a function that will increment an integer by 1 each time a button in an HTA is pressed. I can get it to count to 1, but no further. I am sure it's simple, but I cannot see the wood for the trees.
Below is my code. There is an onClick event called from the HTML page that take an argument of either 'up' or 'down' and this counts up or down.
Any help would be grately apreciated as always.
Many thanks
Woter.
I am trying to create a function that will increment an integer by 1 each time a button in an HTA is pressed. I can get it to count to 1, but no further. I am sure it's simple, but I cannot see the wood for the trees.
Below is my code. There is an onClick event called from the HTML page that take an argument of either 'up' or 'down' and this counts up or down.
Code:
Function buttonCount(direction)
If direction = "up" Then
var = var+1
DataArea.InnerHTML=var
ElseIf direction = "down" Then
var = var-1
DataArea.InnerHTML=var
End If
End Function
Any help would be grately apreciated as always.
Many thanks
Woter.