0

hey, i started learning javascript programing n i wrote this simple code to test, it isn't working, here's the code :-

<script type="text/javascript">
{
	function mltest()
	{
	var fnmae=document.myForm.fName.value;
	var mName=document.myForm.mName.value;
	var lName=document.myForm.lName.value;
	var rtxt;
	rtxt="Your full name is : ";
	rtxt+=fName;
	rtxt+=mName;
	rtxt+=lName;
	var finalName="";
	document.myForm.finalName.value=rtxt;
	}
}
</script>
</head>
<body>
<center>
<form name=myForm>
Enter First name: <input type=text name=fName /><br />
Enter Middle name : <input type=text name=mName /><br />
Enter last name : <input type=text name=lName  /><br />
<input type=button value="Click to generate some custom text" onClick=mltest() /><br />
<input type=text name=finalName />
</form>
</center>
</body>

This program accepts a data using the input form and then gives an output in the last text form.

Can you tell why it isn't working?

2
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by dhruv_arora
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.