This is my code and I am not sure why I cant store the value into the data base
The error should be at this line :
document.getElementById('divPrize').innerHTML = prizes[x]['name'];
Code:
// Now we can work out the prize won by seeing what prize segment startAngle and endAngle the relativeAngle is between.
for (x = 0; x < (prizes.length); x ++)
{
if ((relativeAngle >= prizes[x]['startAngle']) && (relativeAngle <= prizes[x]['endAngle']))
{
// Do something with the knowlege. For this example the user is just alerted, but you could play a sound,
// change the innerHTML of a div to indicate the prize etc - up to you.
// store db
document.getElementById('divPrize').innerHTML = prizes[x]['name'];
document.getElementById('<%=lblPrize.ClientID %>').attributes['Text'] = prize[x]['name'];
alert("You won " + prizes[x]['name'] + "!\nClick 'Play Again' to have another go.");
break;
}
}