salve a tutti,
sto cercando di capire come si recupera un campo da una form per poter fare delle operazioni ad esempio una validazione, ho scritto del codice che sembra perfetto ma agli atti pratici non funziona..eccolo.

codice:
<div id="middle-box">
		<h3 class="title">Come arrivare</h3>
	
		

<script>

  function SearchTown( townStr )
{
	var theRet = { SearchTown:	
		[ 
			{ townId: 182931, townName: "Pisa" },
			{ townId: 182222, townName: "Pistoia" },
			{ townId: 142931, townName: "Pisticci" },
			{ townId: 232212, townName: "Piscinas" }
		]
	}
	return theRet;
}

function SearchAddress( townId, street , streetNum)
{
	theRet = 
	{
		SearchAddress: 
		[ 
			{ townId: 182931, townName: "Pisa", street: "Via Giuseppe Garibaldi", streetNum: 4, arcId: 333333}
		]
	}
	return theRet;
}

function QueryRoute( arcArcId, dstArcId, replyFormat)
{
	
	theRet = 
	{
		arcs: 
		[ 1234, 2143, 2325, 4546, 6543, 4324, 4324, 4342, 465, 4342, 54435, 5764, 7457, 5642] , 

		steps:
		[	 
			{ id: 1234, name: "Via Croce", len: 653, time: 1.8 },
			{ id: 2143, name: "Via Bonanno", len: 2311, time: 4.4  },
			{ id: 2325, name: "Via Mazzini", len: 844, time: 3.8 },
			{ id: 4546, name: "Via Lucchese", len: 921, time: 5.6 }
		]
	}
	return theRet;

}

function RouteGeometry( inArcList, inLOD, inSRID)
{
	theRet = 
	{
       coords: 
		[ {x: 1521543,y: 4452136.5 }, {x: 1521546,y:4452139 } , {x: 1521553,y: 4452140 }] 
	}
	return theRet;
}

function validate(form){
	
	
}


function Calcola(form){
	
	alert(form.comune.value);  // NON FUNZIONA
	alert('funzecaaaa');
	
	
}
</script>

	<div id="middle-box">
      <h3 class="title">Come arrivare</h3>
                
          <form id="s_FormSearch" name="s_Arrivare" method="post" action="#">
             <label>Comune


				<input type="text" name="comune"/>
		     </label>
		     
		     <label>???label.Posizione.Indirizzo???

				<input type="text" name="indirizzo"/>
		     </label>
		     
		     <label>???label.Posizione.Civico???

				<input type="text" name="civico"/>
		     </label>
		  <input type="submit" value="ricerca..." name="submit" id="submit" class="button" onclick="Calcola(this)"/>
		</form>


		</div>  
		   
	</div>



Perchè secondo voi la funzione -----------------function Calcola(form){

alert(form.comune.value); // NON FUNZIONA
alert('funzecaaaa');
}


In cosa sbaglio? Eppure eseguo la chiamata : <input type="submit" value="ricerca..." name="submit" id="submit" class="button" onclick="Calcola(this)"/>

help me!!!