i have this problem:
i have a form with textarea field, and on a onSumbit, i copy content of a div with table to this textarea field.
when i send this form and i send an email with these values in IE i get plain text not formatted. i have tested with Chrome, Firefox, Opera, Safari and i get formatted table. Only IE is not working.
my form begins with:
<form name="form" action="sendmail.php" method="post" onsubmit="formVal()" >
on onSubmit i set text area value with this:
$("#value2").html($("#spReport").html());
and in php script o get value with:
$message = "
<p><b>Summary: </b><br />" . $_POST['value2'] . " .</p>";
then i send this via email.
with Chrome, Firefox, Safari, Opera is working, I get email with table formatted. Only IE gives me this problem. I have checked under IE with Developer Tools, and value of textarea value2 is filled with formatted table (with html tags).
any ideas what can be wrong?
How you’re setting the value of the textarea may have an affect on this, too. You should set the value by:
Using .html() (and even .text()) should only be applied to tags, specifically. .val() is used primarily for setting form field variables. Of course, they’re interchangeable but you don’t know what side effects may occur.