Hi, I have a little problem. It is almost working but it continue to say undefine in the text area instead of the name they type in the txt box. I might be confusing you so i am going to put down what I have then explain what I am trying to do.
var txtaReceipt;
var txtName;
var txtName=document.write.frmMain.txtaReceipt.value("");
function ProcessOrder()
{
document.frmMain.txtaReceipt.value=("Welcome to Dirty Deli," + txtName + "!");
{
alert("hi"); <!--I am only using the alert to let me know that the page is really working, that is how I check that the page is functioning-->
}
<form name=frmMain>
<strong>Customer's Name:</strong>
<input name="txtName" type="text" />
<p></p>
<input type="button" value="Process Order" onclick="ProcessOrder()" />
<br />
<textarea name="txtaReceipt" rows="10" cols="40">
</textarea>
</form>
}
What I am trying to do is when a person put in their name in the txtName box it will show in the txtaReceipt box within my greeting tag.
my problem is that it is not working it continue to say undefine. So I am thinking the variable is undefine or something wrong with it but I dont know how to fix it. Can someone help me please.