setContents is undefined. Add the following to your code and it should work:
- function setContents(id,val) {
-
document.getElementById(id).innerHTML = val;
-
}
thanks acoder. that helped !!
how exactly does the innerHTML = val work ? Well I know what it does now, it places the value in the box right?
Is there a way to position the value in the center of the box ?