Jquery to set hidden form input value to a variable works fine in IE but not in FF or Chrome
<p>I'm a novice using Jquery to format FormMail output so it can be imported into a CRM system.  Customers can fill out an information request form.  On submit, the script pulls the various input values, then a variable strMessage is set using various static and variable inputs to format the content.  Finally the value of a hidden input field is set to equal variable strMessage and the form is posted to a FormMail program.</p>

<p>In IE, the script works as expected, sending out a formatted amail.
In FF &amp; Chrome it sends the email but it the contents are blank</p>

<p>I didn't find any specific answers that helped me solve this cross-browser issue</p>

<p>I ran Firebug and it steps through setting all of hte variable corectly, however it doesn't show any action when it hits the step for setting the formdataarea value to the value of the strMessage variable.</p>

<p>I am thinking that this step That is breaking down in FF and Chrome.</p>

<p>The final step of submitting the form through FormMail works. </p>

<p>HTML and Jquery code I am using is below:</p>

<pre><code>&lt;table border="0" cellpadding="5" cellspacing="5"&gt;&lt;!-- Table formats inputs - This is what the   customer fills out but it isn't in the actual form --&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style="width: 150px;"&gt;First Name: &lt;/td&gt;
&lt;td valign="top"&gt;&lt;input id="firstname" size="40" name="firstname"&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="width: 150px;"&gt;Last Name: &lt;/td&gt;
&lt;td valign="top"&gt;&lt;input id="lastname" size="40" name="lastname"&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="width: 150px;"&gt;Phone: &lt;/td&gt;
&lt;td&gt; &lt;input id="phone" size="40" name="phone"&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="width: 150px;"&gt;Email Address:&lt;/td&gt;
&lt;td valign="top"&gt;&lt;input id="email" size="40" name="email"&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;/tr&gt;&lt;tr&gt;
&lt;td style="width: 150px;"&gt;Street Address&lt;/td&gt;
&lt;td valign="top"&gt;&lt;input id="address" size="40" name="address"&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="width: 150px;"&gt;City&lt;/td&gt;
&lt;td valign="top"&gt;&lt;input id="city" size="40" name="city"&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="width: 150px;"&gt;State or Province:&lt;/td&gt;
&lt;td valign="top"&gt;&lt;select id="state" name="state" style="width: 275px; height: 22px;"&gt;
&lt;option value=""&gt;Please select State or Province&lt;/option&gt;
&lt;option value="INTL"&gt;Not USA or Canada&lt;/option&gt;
&lt;option value="AL"&gt;Alabama&lt;/option&gt;
&lt;option value="AK"&gt;Alaska&lt;/option&gt;
&lt;/select&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="width: 150px;"&gt;Zip or Postal Code:&lt;/td&gt;
&lt;td valign="top"&gt;&lt;input id="zip" size="40" name="zip"&gt; &lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt;&lt;td style="width: 150px;"&gt;Country:&lt;/td&gt;
&lt;td valign="top"&gt;
&lt;select id="country" name="country" style="width: 275px; height: 22px;"&gt;
&lt;option value="USA"&gt;United States&lt;/option&gt;
&lt;option value="Canada"&gt;Canada&lt;/option&gt;
&lt;/select&gt; 
&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt;&lt;td style="width: 150px;"&gt;Message:&amp;nbsp;&lt;/td&gt;
&lt;td valign="top"&gt;&lt;textarea id="message" name="message" rows="6" cols="40"&gt;&lt;/textarea&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;!-- End of the "form" visible to the customer --&gt;

&lt;!-- This is the actual form that gets submitted --&gt;    
&lt;form action="/Store/EmailFormProcessor.aspx" method="post" target="_top"&gt;
&lt;textarea style="display: none;" id="formatedarea" name=""&gt;&lt;/textarea&gt;
&lt;input id="submitbutton" type="submit"&gt;
&lt;/form&gt;
&lt;!-- This is the end of the form that gets submitted --&gt;

&lt;!-- script that processes the customer data, formats it and sets the value of formdataarea in the form to the formatted text.  --&gt; 


$("#submitbutton").click(function(){
        var firstname = $("#firstname").val() 
        var lastname = $("#lastname").val(); 
        var phone = $("#phone").val();
        var email = $("#email").val(); 
        var address = $("#address").val(); 
        var city = $("#city").val(); 
        var state = $("#state").val(); 
        var zip = $("#zip").val(); if(zip == 'undefined'){zip = 00000; };
        var country = $("#country").val(); 
        var message = $("#message").val(); 

// create formatted output
var strMessage = "Savvyboater Contact Form&lt;p/&gt;" + firstname + " " + lastname + "&lt;br&gt;Phone: " +   phone + "&lt;br&gt;Email: " + email +"&lt;br&gt; " + address +"&lt;br&gt;" + city +",  " +  state + " " + zip +" " +  country + "&lt;br&gt;SB Retail&lt;p&gt;Message: " + message+ "&lt;/p&gt;";

$("#formatedarea").val(strMessage); //sets the value of formdata area to the formatted output
 })
</code></pre>
