Я так смущен, поэтому, пожалуйста, будьте терпеливы
Я использую pear 1.9.0, и у меня есть этот простой код для отправки электронной почты.
<script type='text/javascript'>
function contactsendBack(f){
//mes is a div to render messages to the user
document.getElementById("mes").innerHTML="";
//if the user wants to input some mails to the textfiled, but the textfield is actually empty...
if(f.elements['pick'].value=="opt" && f.elements['sendm'].value=="" ){ document.getElementById("mes").innerHTML="Duh, no mails"; return false;}
//if the user wants to input some mails to the textfiled and also include admin mail to the list, but the textfield is actually empty...
else if (f.elements['pick'].value=="admopt"&& f.elements['sendm'].value==""){document.getElementById("mes").innerHTML="Duh, no mails"; return false;}
else
{
//ok, no errors now, so send to server
jQuery.post("contactsendBack.php", {
name : f.elements['name'].value ,
mymail : f.elements['mymail'].value ,
pick : f.elements['pick'].value ,
sendm : f.elements['sendm'].value ,
subj : f.elements['subj'].value ,
comment : f.elements['comment'].value
}, function(data) {
//render what contactsendBack.php echos...could be "send ok" or "error"
$('#mes').html(data);
});
return false;
}
}
</script>
// the html
<form action="#" onSubmit="return contactsendBack(this); return false;" method="post" enctype="multipart/form-data">
Name:<br>
<input name="name" id="name" type="text" required ><br>
Your e-mail:<br>
<input name="mymail" id="mymail" type="email" value="<?php echo $defm ?>" required ><br>
<input type="radio" id="pick" name="pick" value="adm" checked = "checked">Admin<br>
<input type="radio" id="pick" name="pick" value="opt">What I set to the textbox<br>
<input type="radio" id="pick" name="pick" value="admopt">Admin AND What I set to the textbox<br>
<input type="radio" id="pick" name="pick" value="all">Everyone<br>
Set some mails:<br>You can input more than one mail. Separate by commas<br>
<input name="sendm" id="sendm" type="textarea" rows="24" cols="50" ><br>
Subject:<br>
<input name="subj" id="subj" type="text" required><br>
Text :<br>
<input name="comment" id="comment" type="textarea" rows="24" cols="50" required >
<br>
<input type="reset" id="res" name="res"/>
<input type="submit" id="sub" name="sub"/>
</form>
Это отлично работает с Chrome. Echos "send ok", и я вижу новую почту в моей учетной записи электронной почты. Но в Firefox и IE echos "send ok", и я не вижу новых писем в моей учетной записи.
Я также использую j-query 1.8.2
Я не вижу ошибок в консоли IE и FF.
Я просто не понимаю. связано с браузерами? Серверная сторона (contactsendBack.php)? Интерфейс?
Как это исправить?
Есть идеи? Я застрял
благодаря
Осмотрите значения, которые вы получите POSTed на свой скрипт, и сравните разные версии браузера. Там, вероятно, будет разница.