Hi folks,

Not a seasonsed JS user; I would like to have a number of dropdown forms on a page and have JS sum the total value up as the user makes their way down the page and selects values. I've googled the daylights out of this and come up with a proof of concept below - if I could get it to work right, I would apply to a larger page. It will live on a Sharepoint server so I can't just use PHP to handle the summing. Any help on my shortcomings would be greatly appreciated:

<SCRIPT LANGUAGE=javascript>
var sum = 0;
function OnChange(value)
	sum = sum + value; 


<select name=select1 onchange='OnChange(select1)'>
  <option value="1">1</option>
  <option value="2">2</option>
  <option value="3">3</option>
<select name=select2 onchange='OnChange(select2)'>
  <option value="1">1</option>
  <option value="2">2</option>
  <option value="3">3</option>

<script type="text/javascript">