There is a long suffering, but I can not do cross- site request
<p>What now is:</p>

<p>A page on localhost, which sends a request:</p>

<pre><code>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"&gt;
&lt;html&gt;
  &lt;head&gt;
    &lt;title&gt;&lt;/title&gt;

&lt;script language="javascript" type="text/javascript"&gt;
var script = document.createElement('script');

script.setAttribute('src', 'http://www.3dfind.ru/site/js.js');

document.getElementsByTagName('head')[0].appendChild(script);

&lt;/script&gt;

 &lt;/head&gt;

  &lt;body&gt;

&lt;form method="get"&gt; 
&lt;div id='searchform'&gt;
&lt;table&gt;
&lt;td&gt;
&lt;input name='q' id='searchinput' type='text' value=''&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;select name='type' id='searchselect'&gt;
&lt;option value='1'&gt;Val 1&lt;/option&gt;
 &lt;/select&gt;
&lt;/td&gt;
&lt;td&gt;
  &lt;input name='search' type='submit' onclick='MakeRequest();' value='Поиск!' id='searchsubmit'&gt;
&lt;/td&gt;
&lt;/table&gt;
&lt;/form&gt;

    &lt;div id='ResponseDiv'&gt;

    &lt;/div&gt;
  &lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>Then there js script on the server, which receives the request:</p>

<pre><code>function getXMLHttp()
{
  var xmlHttp

  try
  {
    //Firefox, Opera 8.0+, Safari
    xmlHttp = new XMLHttpRequest();
  }
  catch(e)
  {
    //Internet Explorer
    try
    {
      xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
    }
    catch(e)
    {
      try
      {
        xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
      }
      catch(e)
      {
        alert("Your browser does not support AJAX!")
        return false;
      }
    }
  }
  return xmlHttp;
}

function MakeRequest()
{
  var xmlHttp = getXMLHttp();


  var params = 'q=' + encodeURIComponent(q) + '&amp;type=' + encodeURIComponent(type) + '&amp;search=' + encodeURIComponent(s)
  xmlHttp.open("GET", '/result.php?'+params, true)
  xmlHttp.onreadystatechange = function()
  {
    if(xmlHttp.readyState == 4)
    {
      HandleResponse(xmlHttp.responseText);
    }
  }
  xmlHttp.send(null);

}

function HandleResponse(response)
{
  document.getElementById('ResponseDiv').innerHTML = response;
}
</code></pre>

<p>If the file result.php search on the server, you get a url: </p>

<pre><code>http://3dfind.ru/site/result.php?q=%E4%F4%E4%E4%F4%E4&amp;type=1&amp;search=%CF%EE%E8%F1%EA%21
</code></pre>

<p>Also in result.php I accept the GET- request :</p>

<pre><code>  $var = @$_GET['q'] ;
  $s = $_GET['s'] ;
  $typefile = $_GET['type'];
</code></pre>

<p>What am I doing wrong ?</p>
