Click the button to sign in.


SOURCE CODE:

<form name="form1">
<h1>Click the button to sign in.</h1>
<input type="text" value="" name="txtName">
<input type="button" value="Click Me" onClick="Prompter()"><br>
</form>

<script language="JavaScript">
function Prompter() {
var strName=new String()
strName=window.prompt("What is your name?","FirstName");
if (strName=="")
alert("You need to enter your name. Try again.");
else
document.form1.txtName.value=strName;
}
</script>