//javascript function updateSpan(id, val) { val = val-- document.getElementById("potion"+id.toString()).innerHTML=val } //an example of an area on the page calling the function onClick="usePotion(10, 110); updateSpan(10, 3);" //an example of the area being updated 3