Idat 204: The Problems Begin

Right so, the hit counter method doesnt seem to want to work, so instead I thought about a button to tell how many hits the website has had. The idea I was thinking, was if we have an enter website button that can hae a counter attached to it and then we can do do if statements relating to the number of times the enter button has been clicked.

I started to build this up today and hurray, the counter actually worked!!!! The simple code I used was:

Sub BtnPlay_OnClick()

counter = counter + 1
lblResult.InnerText = counter

The first line is the event handler, the second line has the varible counter equaling to its pervious number plus one, and the final line displays the counter number.

To make the button look like a play button I added an image to the button:

<INPUT TYPE=“IMAGE” SRC=“play.jpg” NAME=“BtnPlay” VALUE=“”>

Finally to end the day I added some if statement to change the background colour to certain numbers, this worked fine, so now i am going to go and thinking about how to add the sounds into the code.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s