making a webpage that calculates varience and std deviation for a set of values. first, the user specifies how many values will be entered (via textbox), basically the size of my array. then they are to input that number of values through a text box in my form. after the last value is entered, my page is cleared and then it displays the inputted values in ascending order and displays the calculations.

i'm only up to the part where my array size is determined. i really don't know how to go about the 2nd half of this. my logic is to hide my submit values button, bring up an insert button to add data to my array and calculate. thing is i don't know if i need another form or not... if i did, how would i hide my first form and bring up a 2nd? taking this class as an elective and its stressing me out to the extreme, i'm not a programmer...

here's my code, there might be a line or two in there for testing purposes if i forgot to remove them.

HTML Code:
<!DOCTYPE html>
    <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">
    <title>exercise 4 part 1</title>
    <script type="text/javascript">
	var myArray = [];
      //start function
		function start()
				var button = document.getElementById("submitButton"); 
				button.addEventListener("click", calculations, false); 
			}	//end start
      //calculate stuff
     function calculations()
          //capture value amount for array size
          var arraySize = document.getElementById("valueField");
		//create dynamic Array  
          for (var i = 0; i < arraySize.value ; ++i)
				myArray[i] = i;
          result.innerHTML = myArray.length;
          //get rid of submit button
          showSubmitButton.innerHTML = ""; 
    //specify start function to load first
		window.addEventListener("load", start, false);
    <form id="firstForm" action="#">
      <p><label>Enter number of values: <input id="valueField" type="number"></label></p>
      <p id ="showSubmitButton"><input id="submitButton" value="Submit" type="button"></p>
    <p id="result"></p>