ammend javascript post