title: Ajax cross domain request fail to set headers
body: <p>First thing first, this is my first project with an cross domain ajax request.
  Now, i have a test page with just a button, an input box and jquery.
  What i want to do is send the ajax request to another domani ( i have username and passwod fot this, but i don't know it i have to use it and how) and pass a query, then print the result.</p>
  
  <p>This is my script:</p>
  
  <pre><code>jQuery(document).ready(function ($){
      $("#btn").on("click", function(){
  
      var searchRequest = $("#testSearch").val();
  
      var url = {"https://vk.com/search?c%5Bq%5D="};
  
      var musicSearchRequest = searchRequest + "&amp;c%5Bsection%5D=audio";
      var vkLogin = new XMLHttpRequest();
  
      vkLogin.open("GET", url + musicSearchRequest, true);
      vkLogin.send();
  
      $.ajax({        
          url: url,
          type: "POST",
          crossDomain: true,
          dataType: 'jsonp',
          data: musicSearchRequest,
          success: function(){console.log("ok");},
          error: function (){console.log("no");}
      }); 
  
      $("#result").html(vkLogin.responseText);
      console.log(vkLogin.responseText);
  
  });
  });
  </code></pre>
  
  <p>and this is the html ( i don't think is really important, but i'll copy anyway):</p>
  
  <pre><code>&lt;button id="btn"&gt;click&lt;/button&gt;
  &lt;input type="text" id="testSearch"&gt;&lt;/input&gt;
  &lt;div id="result"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>now, on click, this is the result printed into my debug console:</p>
  
  <blockquote>
    <p>XMLHttpRequest cannot load
    <a href="https://vk.com/search?c%5Bq%5D=katy%20perry&amp;c%5Bsection%5D=audio" rel="nofollow">https://vk.com/search?c%5Bq%5D=katy%20perry&amp;c%5Bsection%5D=audio</a>. No
    'Access-Control-Allow-Origin' header is present on the requested
    resource. Origin 'null' is therefore not allowed access.</p>
  </blockquote>
  
  <p>I searched a bit about the CORS, but just because i'm a beginner, i'd like someone to explain step by step what to do next to fix this error.</p>
  
  <p>Thanks!</p>