A simple thing but i can't get it work.
What i want to achieve is just being able to get that message box when u click on the submit button in the form.
When i use the script below and i load the html page i immediately get the popup box and when i click the button nothing happens .

Can somebody help me out?

Code:
<html>

<body>
<form name="myForm">
The form's name is: <input type="text" name="text1" size="20">
<br /><br />
<input type="button" value="Show the form's name">

<script language="JavaScript" type="text/JavaScript">
document.forms[0].elements[0].onclick=window.alert('You clicked');
</script>

</form>
</body>
</html>