So I'm trying to get the value that is already in the current points field, do a calculation as depicted in the switch statement and then fill the field in again with the new number before submitting instantly. This is all supposed to be done as a way of replacing an SQL update statement. For some reason my EditRecord or document.getElementById doesn't seem to be working at all.
<script LANGUAGE="Javascript">
function calculate(){
var pos = [@pos];
var points = [@field:CurrentPoints#];
switch(pos)
{
case 1: points += 10; break;
case 2: