Ver Mensaje Individual
  #4 (permalink)  
Antiguo 28/10/2012, 14:00
claudgin
 
Fecha de Ingreso: diciembre-2002
Ubicación: madrid
Mensajes: 111
Antigüedad: 21 años, 4 meses
Puntos: 0
Respuesta: $.get("") funciona solo local

Me da el mismo
en local funciona en remoto no:
te mando un codigo:
Código:
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>Ajax</title>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
    <script>
	$(document).ready(function(){
        $('#respuesta').hide();
        $('#tuto-ajax-form').submit(function(evento){
            $('#respuesta').hide();         
            evento.preventDefault();
            var datos_formulario = $(this).serialize();         
            $.ajax({
                url: 'www.midominio.com/movil/pro.php',
                data: datos_formulario,
                type: 'POST',
                dataType: 'json',
                success: function(datos){
                    $('#resultados').text(JSON.stringify(datos, null, 4));
                    $('#respuesta').text(datos.respuesta).fadeIn('slow');
                }
            });
             
        });
    });
	</script>
</head>
<body>
<section id="contenedor-formulario">
    <form id="tuto-ajax-form">
        <input type="text" id="nombre" name="nombre" placeholder="Su nombre"><br>
        <input type="tel" id="telefono" name="telefono" placeholder="Su teléfono"><br>
        <label for="horario">Hora de contacto</label><br>
        <input name="horario" type="radio" checked="checked" value="Mañana"> Mañana<br>
        <input name="horario" type="radio" value="Tarde"> Tarde<br>
        <button type="submit">Enviar</button>
    </form>
</section>
<section id="resultados">
</section>
<section id="respuesta"></section>

</body>
</html>
__________________
Novato