Ver Mensaje Individual
  #1 (permalink)  
Antiguo 10/07/2009, 03:54
LuisaJava
 
Fecha de Ingreso: abril-2008
Mensajes: 81
Antigüedad: 16 años
Puntos: 0
Pregunta Cargar archivo .html desde javascript

Hola a todos

Acá les muestro un trozo de código en el que la variable warning me saca por pantalla una invitación al usuario para que actualice su navegador IE6 o bien se pase a otro distinto.

Cita:
var warning = "INVITACIÓN (abreviada) A CAMBIAR DE NAVEGADOR ";

this.box = new Element('div', {'id': 'iewarn'}).inject(document.body, 'top');
var div = new Element('div').inject(this.box).setHTML(warning);
He abrediado el contenido de la variable warning porque el original es larguísimo.

Bien, lo que yo quiero hacer es cargar un archivo html que contiene un mapa de imágenes, lo cual es mucho más gráfico que un texto enorme que quizás nadie lee.

El Código HTML es el siguiente:
Código HTML:
<html>
<head>
  <title>Actualice su navegador</title>
</head>
<body>



<!-- Inicio Mapa de imagen  -->
<img src="mensaje navegador.png" USEMAP="#mapFireFox" BORDER=0>
<map name="mapFireFox">
  <area name="navFireFox" shape="rect" coords="35,206,145,312" href="http://www.mozilla-europe.org/es/firefox/"  alt="FireFox" title="FireFox" OnMouseOver="window.status='Descargar Navegador FireFox'; return true" OnMouseOut="window.status=''; return true" target="_blank">
  <area name="navOpera" shape="rect" coords="153,205,265,314" href="http://www.opera.com/browser/"  alt="Opera" title="Opera" OnMouseOver="window.status='Descargar Navegador Ópera'; return true" OnMouseOut="window.status=''; return true" target="_blank">
  <area name="navChrome" shape="rect" coords="273,205,384,312" href="http://www.google.com/chrome"  alt="Chrome" title="Chrome" OnMouseOver="window.status='Descargar Navegador Chrome'; return true" OnMouseOut="window.status=''; return true" target="_blank">
  <area name="navSafari" shape="rect" coords="392,205,504,312" href="http://www.apple.com/es/safari/"  alt="Safari" title="Safari" OnMouseOver="window.status='Descargar Navegador Safari'; return true" OnMouseOut="window.status=''; return true" target="_blank">
  <area name="navIE" shape="rect" coords="510,205,623,313" href="http://www.microsoft.com/windows/internet-explorer/"  alt="Internet Explorer" title="Internet Explorer" OnMouseOver="window.status='Descargar Navegador Internet Explorer'; return true" OnMouseOut="window.status=''; return true" target="_blank">
</map>
<!-- Fin Mapa de imagen  -->
</body>
</html> 

Cómo hago para llamar a ese archivo html (navegadores.html) desde el código javascript y que me aparezca en lugar de lo que contiene la variable warning.

Espero haberme explicado.

Muchas gracias,
Luisa