Ver Mensaje Individual
  #1 (permalink)  
Antiguo 04/04/2010, 23:44
israelmx
 
Fecha de Ingreso: marzo-2009
Mensajes: 32
Antigüedad: 15 años, 1 mes
Puntos: 0
Ayuda con html en div

Hola Amigos espero que puedan ayudarme , tengo mas de 5 dias buscando la solucion....

estoy haciendo mi pagina web y quiero cargar un contenido en un div



Código HTML:
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Primer ejemplo AJAX Prototype</title>
</head>

<script type="text/javascript">

function nuevoAjax(xmlhttp){

   try {
       xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
    } 
   catch (e) {
       try {
         xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
      } 
      catch (E) {
          xmlhttp = false;
      }
   }
   if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
      xmlhttp = new XMLHttpRequest();
   }
   return xmlhttp
}

function cargarContenido(pagina,destino){
   var contenedor;
   var ajax;
   
   contenedor = document.getElementById(destino);
   ajax = nuevoAjax(ajax);
   ajax.open("GET", pagina, true);
   ajax.onreadystatechange=function() {
      if (ajax.readyState==4) {
         contenedor.innerHTML = ajax.responseText;
      }
   }
   ajax.send(null);
}



</script>
</head>
<body >
<a href="#" onclick="cargarContenido('noticias.html', 'contenedor')">Cargar contenido</a>
<a href="#" onclick="cargarContenido('galeria/index.php', 'contenedor')">Galeria</a>
<a href="galeria/index.php">Galeria REAL</a>

<div id="contenedor">
aqui aparecera el contenido
</div>

</body>



pero no me carga los scripts de todo... no se que hacer la verdad... si seleccionan galeria correcta podran ver como debe mostrar la galeria...

espero puedan ayudarme

muchas gracias


PARA VER FUNCIONANDO AQUI

www.ucam.com.mx/prueba/prueba8.html