Foros del Web » Creando para Internet » Diseño web »

Este codigo me tarda muchisimo en cargar,alguna idea?

Estas en el tema de Este codigo me tarda muchisimo en cargar,alguna idea? en el foro de Diseño web en Foros del Web. Hola buenas, Tengo este codigo: Código: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="es" xml:lang="es"> <head> <title>Chriser Miniaturas</title> <link href="es.css" rel="stylesheet" type="text/css" ...
  #1 (permalink)  
Antiguo 16/11/2006, 12:28
Avatar de limboings  
Fecha de Ingreso: enero-2005
Mensajes: 794
Antigüedad: 19 años, 2 meses
Puntos: 2
Este codigo me tarda muchisimo en cargar,alguna idea?

Hola buenas,

Tengo este codigo:
Código:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="es" xml:lang="es">
<head>
<title>Chriser Miniaturas</title>
<link href="es.css" rel="stylesheet" type="text/css" />
<!--[if IE]>
<link href="ese.css" rel="stylesheet" type="text/css" />
<![endif]-->
<!--[if IE]>
<script language="JavaScript">
function correctPNG() // correctly handle PNG transparency in Win IE 5.5 or higher.
{
for(var i=0; i<document.images.length; i++)
{
var img = document.images[i]
var imgName = img.src.toUpperCase()
if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
{
var imgID = (img.id) ? "id='" + img.id + "' " : ""
var imgClass = (img.className) ? "class='" + img.className + "' " : ""
var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
var imgStyle = "display:inline-block;" + img.style.cssText
if (img.align == "left") imgStyle = "float:left;" + imgStyle
if (img.align == "right") imgStyle = "float:right;" + imgStyle
if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle
var strNewHTML = "<span " + imgID + imgClass + imgTitle
+ " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
+ "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
+ "(src=\'" + img.src + "\');\"></span>"
img.outerHTML = strNewHTML
i = i-1
}
}
}
window.attachEvent("onload", correctPNG);
</script>
<script language="JavaScript">
startList = function() {
if (document.all&&document.getElementById) {
navRoot = document.getElementById("nav");
for (i=0; i<navRoot.childNodes.length; i++) {
node = navRoot.childNodes[i];
if (node.nodeName=="LI") {
node.onmouseover=function() {
this.className+=" over";
  }
  node.onmouseout=function() {
  this.className=this.className.replace(" over", "");
   }
   }
  }
 }
}
window.onload=startList;
</script>
<![endif]-->
</head>
Estoy seguro que es el javascript que tengo en el condicional de IE porque en FireFox se carga normal,a una velocidad normal,pero en IE se me "clava" el navegador como sino respondiera..pero al cabo de un minuto o asi vuelve a ponerse bien y me carga la web,aunque tarda bastante..

Alguien sabe por que??

Un Saludo y gracias de antemano!!
__________________
La chapucería de la esquina
  #2 (permalink)  
Antiguo 16/11/2006, 13:14
Avatar de limboings  
Fecha de Ingreso: enero-2005
Mensajes: 794
Antigüedad: 19 años, 2 meses
Puntos: 2
Buenas de nuevo,

Bueno e estado haciendo pruebas y lo que falla no es el JavaScript en si..sino los condicionales de IE que pongo,si quito todos los condicionales me carga totalmente bien pero si en cambio pongo tan solo uno,por ejemplo el de CSS,me ocurre lo que describo..se supone que deveria funcionarme bien no??

Un saludo y gracias!!
__________________
La chapucería de la esquina
  #3 (permalink)  
Antiguo 17/11/2006, 08:56
Avatar de ysalek  
Fecha de Ingreso: noviembre-2006
Mensajes: 32
Antigüedad: 17 años, 5 meses
Puntos: 0
Eso se llama rebundancia cíclica, cuando se queda atorado el codigo haciendo lo mismo y lo mismo en un punto, puede ser por java funciona diferente en firefox que en el IE
  #4 (permalink)  
Antiguo 17/11/2006, 13:06
Avatar de limboings  
Fecha de Ingreso: enero-2005
Mensajes: 794
Antigüedad: 19 años, 2 meses
Puntos: 2
Buenas,
El problema no es JS,como y adije despues de muchas pruebas me di cuenta que el problema estaba en el css..si quito el condicional de IE de "ese.css" funciona correctamente..

Sabes lo que puede ocurrir??

Un Saludo y gracias!!
__________________
La chapucería de la esquina
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 12:05.