title: Change Value of Hidden Field using Javascript
body: <p>I have following form where i want to assign value of "R.EmailAddress" field to a Hidden field
  "email_From". </p>
  
  <p>I tried to use the function doCalculate in Javascript but its not assigning R.EmailAddress to email_From, is it because of input type="image" ??</p>
  
  <pre><code>&lt;form name="eMail" method="post" action="/emailform.asp" &gt;
  &lt;input type="text" name="R.EmailAddress" class="textfield_contact" value=""&gt;
  &lt;input type="hidden" name="email_From" value="contact@shopbyus.com"&gt;
  &lt;input type="image" src="submit.gif" border="0" name="submit" value="Submit" `onClick="doCalculate(this.form)"&gt;`
  </code></pre>
  
  <p>My Javascript function looks like below</p>
  
  <pre><code>&lt;script language="javascript" type="text/javascript"&gt;
  function doCalculate(theForm){
      var aVal = theForm.R.EmailAddress.value;
      theForm.email_From.value=aVal;
      alert(aVal);
  }
  
  &lt;/script&gt;
  </code></pre>