Using $.ajax() to send POST to PHP file on other domain
<p>Can I use $.ajax() to send POST to PHP file on other domain? A have a error message in $.ajax(). In Chrome or Firefox - email send. In IE - email is not send.</p>

<p>This is HTML file</p>

<pre><code>&lt;form name="order" method="post"action="http://www.site.ru/images/stories/controller.php"&gt;
&lt;label&gt;1. Mark*:&lt;/label&gt;
    &lt;select name="mark" class="inputbox"&gt;
        &lt;option ="selected"&gt;&lt;/option&gt;
        &lt;option&gt;Audi&lt;/option&gt;
        &lt;option&gt;BMW&lt;/option&gt;
    &lt;/select&gt;
&lt;label&gt;2. Model*:&lt;/label&gt;
    &lt;input type="text" name="model" size="30" class="inputbox"/&gt;
&lt;label&gt;3. Year*:&lt;/label&gt;
    &lt;select name="year" class="inputbox"&gt;
        &lt;option ="selected"&gt;&lt;/option&gt;
        &lt;option&gt;2011&lt;/option&gt;
        &lt;option&gt;2010&lt;/option&gt;
    &lt;/select&gt;
&lt;label&gt;4. Value, l*:&lt;/label&gt;
    &lt;input type="text" name="value" class="inputbox" size="30"/&gt;
&lt;label&gt;5. Transmission*:&lt;/label&gt;
    &lt;select name="transmission" class="inputbox"&gt;
        &lt;option ="selected"&gt;&lt;/option&gt;
        &lt;option&gt;Manual&lt;/option&gt;
        &lt;option&gt;Automatic&lt;/option&gt;
    &lt;/select&gt;
&lt;label&gt;6. VIN:&lt;/label&gt;
    &lt;input type="text" name="vin" size="30" value="" class="inputbox" maxlength="17" /&gt;
&lt;label&gt;7. E-mail*:&lt;/label&gt;
    &lt;input type="text" name="email" size="30" class="inputbox" /&gt;
&lt;label&gt;Note*:&lt;/label&gt;
    &lt;textarea cols="50" rows="5" name="text" id="contact_text" class="inputbox"/&lt;/textarea&gt;
&lt;input type="button" value="Send" onclick="valid();"&gt;&lt;/input&gt;
&lt;/form&gt;

&lt;script src="http://admin.abcp.ru/common.jscripts/jquery/jquery-1.6.2.min.js"&gt;&lt;/script&gt;
&lt;script language="JavaScript" type="text/javascript"&gt;
function sendEmail(mark, model, year, value, transmission, vin, email, text){
    $.ajax({
        url: "http://www.site.ru/images/stories/controller.php",
        type : "POST",
        data : {
            mark : mark,
            model : model,
            year : year,
            value : value,
            transmission : transmission,
            vin : vin,
            email : email,
            text : text
        },
        success: function(){
            alert('Success.');
        },
        error : function (){
            alert('Error.');
        }
    });
}
&lt;/script&gt;
&lt;script language="JavaScript" type="text/javascript"&gt;
function valid(){
if (document.order.mark.value == ""){
    alert("Mark is empty.");
    document.order.mark.focus(true);
    return false;
}
if (document.order.model.value == ""){
    alert("Model is empty.");
    document.order.model.focus(true);
    return false;
}
if (document.order.year.value == ""){
    alert("Year is empty.");
    document.order.year.focus(true);
    return false;
}
if (document.order.value.value == ""){
    alert("Value is empty.");
    document.order.value.focus(true);
    return false;
}
if (document.order.transmission.value == ""){
    alert("Transmission is empty.");
document.order.transmission.focus(true);
    return false;
}
if (document.order.email.value == ""){
    alert("E-mail is empty.");
document.order.email.focus(true);
    return false;
}
if (document.order.text.value == ""){
    alert("Text is empty.");
document.order.text.focus(true);
    return false;
}
sendEmail(document.order.mark.text, 
    document.order.model.text,
    document.order.year.text, 
    document.order.value.text, 
    document.order.transmission.text,
    document.order.vin.text,
    document.order.email.text, 
    document.order.text.text);
}
&lt;/script&gt;
</code></pre>

<p>This is PHP file controller.php</p>

<pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
&lt;head&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8"/&gt;
&lt;title&gt;Обратная связь&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;?php
$from = $email;
$to = "pinaza@avt59.ru";
$subject = "PINAZA.RU - Запрос по $mark";
$message = "Марка автомобиля: $mark \nМодель автомобиля: $model \nГод выпуска: $year \nОбъем двигателя, л: $value \nТип КПП: $transmission \nVIN-код: $vin \nНеобходимые детали:     $text";
$headers = "Content-type: text/plain; charset = utf-8";
mail("$to", "$subject", "$message", "from: ".$from."\r\n"."$headers");
?&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>
