Foros del Web » Programando para Internet » Javascript » Frameworks JS »

no me carga nada en el html

Estas en el tema de no me carga nada en el html en el foro de Frameworks JS en Foros del Web. ai si estube arreglando un poco el codigo ahora tengo otro problema no me muestra nada el ajax D; @import url("http://static.forosdelweb.com/clientscript/vbulletin_css/geshi.css"); Código PHP: Ver original ...
  #1 (permalink)  
Antiguo 04/06/2012, 08:53
 
Fecha de Ingreso: mayo-2012
Mensajes: 28
Antigüedad: 11 años, 10 meses
Puntos: 0
no me carga nada en el html

ai si estube arreglando un poco el codigo ahora tengo otro problema no me muestra nada el ajax D;

Código PHP:
Ver original
  1. <html>
  2.     <head>
  3.             <script language="javascript" type="text/javascript" src="ajax_admin_urg_add.PHP"></script>
  4.             <script  src="jquery-1.7.2.js"></script>
  5.         <body>
  6.     <br>
  7.         <label>Nombre de Usuario:</label><input type="text" id="texto1" />
  8.         <input  type="button" value = "Consultar" id ="boton" />
  9.         <br></br>
  10.         <br></br>
  11.         <br></br>
  12.         <label>DATOS USUARIO</label>
  13.         <div id ="datos_usu">
  14.         <br></br>
  15.         <br></br>
  16.         <br></br>
  17.         </div>
  18.         <label>PERMISOS QUE POSEE</label>
  19.         <div id ="permiso">
  20.         <br></br>
  21.         </div>
  22.        
  23.         </body>
  24.     </head>
  25. </html>

Código PHP:
Ver original
  1. $hola = $_GET['mensaje'];
  2.     $usu_urg = new UsuarioUrgencia();
  3.     $dato_usu = new Usuario();
  4.     $funcio= new Funcionario();
  5.     $bus = $usu_urg -> buscar($hola);
  6.     $bus3 = $funcio -> setFuncionario($id);
  7.     $bus2 = $dato_usu -> setUsuario($bus['out_usu_id']);
  8.     $id = $dato_usu -> getFunID();
  9.     $nombres = $funcio -> getNombres();
  10.     $rut = $funcio -> getRut();
  11.     $dv = $funcio -> getDv();
  12.     $apellido = $funcio -> getApellidoPaterno();
  13.     $apellido2 = $funcio -> getApellidoMaterno();
  14.        
  15.         echo 'hola';
  16.  
  17.  
  18. ?>

en este php tengo mi ajax me gustaria mostrar esos echos en algun div

pd: una ayudadita si estoy perdido

Última edición por warelo17; 04/06/2012 a las 13:15
  #2 (permalink)  
Antiguo 04/06/2012, 13:17
 
Fecha de Ingreso: mayo-2012
Mensajes: 28
Antigüedad: 11 años, 10 meses
Puntos: 0
Respuesta: no me carga nada en el html

ai arregle un poco el codigo
  #3 (permalink)  
Antiguo 04/06/2012, 13:40
 
Fecha de Ingreso: mayo-2012
Mensajes: 28
Antigüedad: 11 años, 10 meses
Puntos: 0
no puedo pillar el error en este script (no me retorna datos))

como dice el titulo no me retorna datos nose por q lo veo y lo tengo bueno.. nose que podra ser
Código PHP:
Ver original
  1. <html>
  2.     <head>
  3.         <script type="text/javascript" src="jquery-1.7.2.js"></script>
  4.     </head>
  5.  
  6.     <body>
  7.         <br>
  8.         <label>Nombre de Usuario:</label>
  9.         <input type="text" id="texto" />
  10.         <input  type= "button" value = "Consultar" id = "boton" />
  11.         <br></br>
  12.         <br></br>
  13.         <br></br>
  14.         <label>DATOS USUARIO</label>
  15.         <div id = "datos_usu">
  16.             <br></br>
  17.             <br></br>
  18.             <br></br>
  19.         </div>
  20.         <label>PERMISOS QUE POSEE</label>
  21.         <div id ="permiso">
  22.         <br></br>
  23.         </div>
  24.        
  25.         <script>
  26.             $(document).ready(function(e) {
  27.                 $('#boton').click(function(){
  28.                     var mensaje = $('#texto').val();
  29.                     alert(mensaje);
  30.                     $.ajax({
  31.                         type     : "GET",
  32.                         url      : "ajax_admin_urg_add.php",
  33.                         data     : "mensaje="+mensaje,
  34.                         cache    : false,
  35.                         success  : function(datos){
  36.                                 alert("hola");
  37.                                 alert(datos);
  38.                                
  39.                         }
  40.                     });
  41.                 })
  42.             });
  43.         </script>
  44.     </body>
  45. </html>

en la funcion del succes tengo problemas creo por q antes tengo un alert que me lo imprime

Etiquetas: ajax, funcion, html, input, javascript, jquery, js, nada, php, retorna, botones
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 06:12.