Quicky with document.write

I’m pretty much a newb with javascript, I’m trying to do something pretty basic I think but stuck at the last part. Here is a link to the script so you can take a look:
http://berryequipment.net/berry3/javascript.html
You enter a number in each box then click submit, it will do the functions and display the results. Though, the page gets stuck in a “loading” state after the results are posted and the form doesn’t show up again. Not sure why it does that? I just wanted the messages to show up and the form to reload.

<html><head>
<script type="text/javascript">
	function validate_form(form) {

		var number1 = form.number1.value;
		var number12 = Math.sqrt(number1);
		var number2 = form.number2.value;
		var number22 = (number2 / 2);

		document.write('Number1: '+number1+"<br />");
		document.write('Number12:'+number12+"<br />");
		document.write('Number2: '+number2+"<br />");
		document.write('Number22:'+number22+"<br /><br />");
		document.write('Thank you for using this program!');

	}
</script>
</head><body>
<form onsubmit="return validate_form(this);">
	Number 1: <input name="number1" type="text" value=""><br />
	Number 2: <input name="number2" type="text" value=""><br />
			  <input type="submit" value="Submit">
</form>
</body></html>

Need this finished asap, thanks for any help!

I suspect that you are using Firefox.

The reload problem is occurring because the page is trying to submit the form to a new page.

Return false from the function, which is then returned to the onsubmit event, to prevent the page from attempting to submit the form.

Another issue is that the first document.write statement will also attempt to load a new page since the script is running after the page has finished loading and document.write can only be used before the page finishes loading. So your document.write statements will really need to generate an entire web page if you are going to use them that way.