Ver Mensaje Individual
  #1 (permalink)  
Antiguo 28/08/2011, 18:36
Avatar de javih
javih
 
Fecha de Ingreso: agosto-2011
Mensajes: 201
Antigüedad: 12 años, 8 meses
Puntos: 12
Error al cargar datos xml con jQuery

Hola,

Me aparece este error al cargar unos datos de un xml en un servidor remoto:

Cita:
XMLHttpRequest cannot load http://www.servidor_datos.net Origin http://www.midominio.net is not allowed by Access-Control-Allow-Origin.
¿esto a qué se debe, error del código u otra cosa?

este es el código:

Código:
$.ajax({
  type: 'GET',
  url: 'http://www.servidor_datos.xml',
  cache: false,
  dataType: ($.browser.msie) ? 'text' : 'xml', 
  success: function(data){
    var xml;
    if(typeof data == 'string'){
      xml = new
      ActiveXObject('Microsoft.XMLDOM');
      xml.async = false;
      xml.loadXML(data);
    } else {
      xml = data;
    }
Saludos