I have this code:
<script type=text/javascript>
function changestate()
{
var StateTextBox = document.getElementById(State);
var IgnoreTextBox = document.getElementById(Ignore);
var PlayButton = document.getElementById(Play);
if(document.getElementById(Play).onclick == true)
{
StateTextBox.value = Happy;
}
}
</script>
<input TYPE=button VALUE=Play with Pogo id=Play onClick=changestate();/>
I'm trying to know when the button is clicked, and have that if button is clicked in the if statement. I want to know this so I can change the value that is inside the text box. The problem is, I do not know how to tell when the button is clicked. If you could help me out that would be great.