Foros del Web

Foros del Web (http://www.forosdelweb.com/)
-   Diseño web (http://www.forosdelweb.com/f91/)
-   -   Este codigo me tarda muchisimo en cargar,alguna idea? (http://www.forosdelweb.com/f91/este-codigo-tarda-muchisimo-cargar-alguna-idea-443724/)

limboings 16/11/2006 12:28

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!!

limboings 16/11/2006 13:14

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!!

ysalek 17/11/2006 08:56

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

limboings 17/11/2006 13:06

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 zona horaria es GMT -6. Ahora son las 01:56.

Desarrollado por vBulletin® Versión 3.8.7
Derechos de Autor ©2000 - 2026, Jelsoft Enterprises Ltd.