Receiving NaN error and no date output
<p>Not sure what my problem is.  I'm trying to display the date in the "Order Placed" field, and have it calculate the total into the "Total" field.  Frustrated and I could use some help.  </p>

<pre><code>&lt;html&gt;
&lt;head&gt;
&lt;title&gt;My Order Form&lt;/title&gt;
&lt;!-- Modified by:  --&gt;
&lt;!-- This web page should display the current date in the txtDate
     textbox on the form as well as calculate the order total and display
     in the txtTotal textbox on the form. --&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/&gt;
&lt;script language="javascript" type="text/javascript"&gt;
&lt;!-- hide from old browsers
function enterDate() {
//reads, formats, then displays the current date in the txtDate textbox on the order form
  var myDate = new Date();
  var myMonthNum = myDate.getMonth();
  var myDay = myDate.getDay();
  var myYear = myDate.getYear();

  var monthNames = new Array()
  monthNames[0] = "Jan";
    monthNames[1] = "Feb";
    monthNames[2] = "Mar";
    monthNames[3] = "Apr";
    monthNames[4] = "May";
    monthNames[5] = "Jun";
    monthNames[6] = "Jul";
    monthNames[7] = "Aug";
    monthNames[8] = "Sep";
    monthNames[9] = "Oct";
    monthNames[10] = "Nov";
    monthNames[11] = "Dec";

  var myMonth = monthNames[myMonthNum];

  var myNiceDate = myMonth + " " + myDay + ", " + myYear;

  document.frmOrder.txtDate.value = myNiceDate;
}

function enterTotal (quantity, price) {
  //calculates the price for each item, adds to existing totals, then displays in the txtTotal textbox
  var myTotal = parseInt(window.document.frmOrder.txtTotal);
  myTotal += (quantity * price);
  window.document.frmOrder.txtTotal.value = myTotal;  
}
// --&gt;
&lt;/script&gt;
&lt;/head&gt;

&lt;body onLoad="enterDate(); window.document.frmOrder.txtWidget.focus()"&gt;
&lt;h1 align="center"&gt;Totally Useless Parts&lt;/h1&gt;
&lt;h2 align="center"&gt;Order Form&lt;/h2&gt;
&lt;hr&gt;
&lt;form action="mailto:email@email.com" method="post" 
      enctype="text/plain" name="frmOrder" id="frmOrder"&gt;
  &lt;table width="100%"  border="0" cellspacing="0" cellpadding="5" 
         summary="Contains the form elements for the order form"&gt;
    &lt;tr valign="top"&gt;
      &lt;td&gt;&amp;nbsp;&lt;/td&gt;
      &lt;td&gt;&amp;nbsp;&lt;/td&gt;
      &lt;td&gt;&lt;div align="right"&gt;&lt;/div&gt;&lt;/td&gt;
      &lt;td&gt;&lt;div align="right"&gt;Order Placed:
          &lt;input name="txtDate" type="text" id="txtDate"/&gt;
      &lt;/div&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr valign="top"&gt;
      &lt;td&gt;Item&lt;/td&gt;
      &lt;td&gt;Quantity&lt;/td&gt;
      &lt;td&gt;&amp;nbsp;&lt;/td&gt;
      &lt;td&gt;Mail To: &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr valign="top"&gt;
      &lt;td&gt;Widgets &lt;/td&gt;
      &lt;td&gt;&lt;input name="txtWidget" type="text" id="txtWidget" size="4" 
                 onChange="enterTotal(document.frmOrder.txtWidget, 4.99)"/&gt;
      (@ $4.99 each)&lt;/td&gt;
      &lt;td&gt;&amp;nbsp;&lt;/td&gt;
      &lt;td rowspan="5"&gt;&lt;textarea name="txaAddress" cols="50" rows="6" id="txaAddress"&gt;&lt;/textarea&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr valign="top"&gt;
      &lt;td&gt;Gizmos&lt;/td&gt;
      &lt;td&gt;&lt;input name="txtGizmo" type="text" id="txtGizmo" size="4" 
                 onChange="enterTotal(document.frmOrder.txtGizmo.value, 2.50)"/&gt;
(@ $2.50 each) &lt;/td&gt;
      &lt;td&gt;&amp;nbsp;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr valign="top"&gt;
      &lt;td&gt;Thing-a-ma-jigs&lt;/td&gt;
      &lt;td&gt;&lt;input name="txtThing" type="text" id="txtThing" size="4" 
                 onChange="enterTotal(document.frmOrder.txtThing.value, 0.95)"/&gt;
(@ $0.95 each) &lt;/td&gt;
      &lt;td&gt;&amp;nbsp;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr valign="top"&gt;
      &lt;td colspan="2"&gt;&lt;hr&gt;&lt;/td&gt;
      &lt;td&gt;&amp;nbsp;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr valign="top"&gt;
      &lt;td align="right"&gt;Total:&lt;/td&gt;
      &lt;td&gt;$
        &lt;input name="txtTotal" type="text" id="txtTotal" value="0"  onChange="enterTotal()"/&gt; 
        (US) &lt;/td&gt;
      &lt;td&gt;&amp;nbsp;&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/table&gt;
&lt;/form&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>
