Ir para conteúdo

POWERED BY:

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

Lincoln Nogueira

Jquery iframe Auto-Height não funciona no IE

Recommended Posts

Estou desenvolvendo um site mas esta dando erro no IE não esta carregando a pagina principal quando acesso.

 

Estou usando um plugin jquery para Auto-Height no IFRAME mas esta dando erro.

 

Esta é a pagina minha www.w3is.com.br

 

 

 

 

plugin autoHeight.js


function doIframe(){
	o = document.getElementsByTagName('iframe');
	for(i=0;i<o.length;i++){
		if (/\bautoHeight\b/.test(o[i].className)){
			setHeight(o[i]);
			addEvent(o[i],'load', doIframe);
		}
	}
}

function setHeight(e){
	if(e.contentDocument){
		e.height = e.contentDocument.body.offsetHeight + 50;
	} else {
		e.height = e.contentWindow.document.body.scrollHeight;
	}
}

function addEvent(obj, evType, fn){
	if(obj.addEventListener)
	{
	obj.addEventListener(evType, fn,false);
	return true;
	} else if (obj.attachEvent){
	var r = obj.attachEvent("on"+evType, fn);
	return r;
	} else {
	return false;
	}
}

if (document.getElementById && document.createTextNode){
 addEvent(window,'load', doIframe);	
}

Pag Index.php

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pt-br">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="google-site-verification" content="BdFqmwV8flGxGPvABWkl33H3NIw7QNcnSQMBoUAWNJ4" />
<meta name="description" content="w3is, all-in-one, virtualização, ti, verde, informatica" />
<meta name="robots" content="index,follow" />
<meta name="author" content="Lincoln Rocha Nogueira" />
<title>w3is - Solução Ideal para a sua Empresa</title>
<script type="text/javascript" src="js/jquery-1.4.3.min.js"></script>
<script type="text/javascript" src="js/autoHeight.js"></script>
<link rel="stylesheet" type="text/css" media="all" href="css/index.css" />
</head>

<body>
<div id="tudo">
<div id="linha1">
<div id="menu1">
<img alt="" src="imagens/Figura1.jpg" width="300" height="90"></img>
</div>

<div id="menu2">
<div class="bordaBox">
<b class="b1"></b><b class="b2"></b><b class="b3"></b><b class="b4"></b>
<div class="conteudo"><p class="text">

<a href="principal.php" target="myframe">HOME</a>    |
    <a href="empresa.php" target="myframe">EMPRESA</a>    |
    <a href="solucoes.php" target="myframe">SOLUÇÕES</a>    |
    <a href="produtos.php" target="myframe">PROMOÇÕES</a>    |
    <a href="contato.php" target="myframe">CONTATO</a></p>
</div>
<b class="b4"></b><b class="b3"></b><b class="b2"></b><b class="b1"></b>
</div>
</div>
</div>

<div id="linha2">
<script>
var iframe = document.getElementById('myframe');
iframe.style.height = iframe.contentDocument.height + 450;
</script>

<iframe width="950" id="myframe" name="myframe" class="autoHeight" scrolling="auto" frameborder="0" src="principal.php"></iframe>

<script type="text/javascript">
      jQuery('iframe').iframeAutoHeight();
</script>


</div>
<div id="linha3">
<div id="rodape1">
<a href="http://www.facebook.com/?ref=home#!/profile.php?id=100001531389195" target="_blank"><img alt="Facebook" src="imagens/facebook-logo.png"  width="55" height="55"/></a>  
		 <a href="http://www.twitter.com/lw3is" target="_blank"><img alt="Twitter" src="imagens/twitter-logo.png"  width="55" height="55"/></a>
		 <a href="http://www.formspring.me/w3is" target="_blank"><img alt="FormSpring ME" src="imagens/formspring_logo.png"  width="130" height="28"/></a>
		 <a href="http://www.youtube.com/user/w3isti" target="_blank"><img alt="Youtube" src="imagens/youtube.png" width="95" height="50"/></a>
    	<a href="http://jigsaw.w3.org/css-validator/check/referer"><img style="border:0;width:88px;height:31px" src="http://jigsaw.w3.org/css-validator/images/vcss" alt="CSS válido!" /></a>

      

</div>
<div id="rodape2">
<p class="menur">
<a href="contato.php" target="myframe">CONTATO</a>  
|  <a href="fabricantes.php" target="myframe">FABRICANTES</a>  
|  <a href=".php" target="myframe">SEJA UM PARCEIRO</a>  
|  <a href=".php" target="myframe">NEWS</a>  
|  <a href="http://olhardigital.uol.com.br/" target="_black">TECNOLOGIA</a>  
|  <a href="mapa.php" target="myframe">MAPA DO SITE</a>    

</p>
<p class="rodap">
Rua Afonso Pena, 592 - 04/36 Rio Acima - MG +55(31)2557-1024<br />
Copyright © 2008 - Todos direitos reservados</p>
</div>
</div>
</div>

</body>
</html>

IFRAME carregado ao entrar no site principal.php

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>w3is</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" media="all" href="css/principal.css" />
</head>

<body>
<div id="tudo">
<div id="linha">
<object width="860" height="200">
<param name="movie" value="site.swf">
<embed src="site.swf" width="860" height="200">
</embed>
</object>
</div>
<div id="linha">
<div id="linha1">
<div id="colesq">
<p class="tit">Outsourcing</p>
<p class="text">
O outsourcing é a forma eficaz e estratégica de controlar operações, reduzir custos, obter recursos especializados, obter mais produtividade, valor agregado e acesso privilegiado às últimas tecnologias do mercado.</p>
<a href="outsourcing.php" target="myframe">Veja Mais>> </a>
</div>
<div id="colcen">
<p class="tit">Nossa Empresa</p><p class="text">
A w3is é uma empresa que oferece soluções integradas em tecnologia. Nosso foco é atender a demandas de empresas através de soluções tecnologicamente confiáveis.
</p><a href="empresa.php" target="myframe">Veja Mais>> </a>
</div>
<div id="coldir">
<p class="tit">TI VERDE</p><p class="text">
Ti Verde é que a prática sustentável de produção, gerenciamento e descarte dos equipamentos eletrônicos, bem como economia de energia elétrica. 
</p>
<a href="tiverde.php" target="myframe">Veja Mais>> </a></div>
</div>
<div id="navegacao">
<div class="bordaBox">
<b class="b1"></b><b class="b2"></b><b class="b3"></b><b class="b4"></b>
<div class="conteudo">
<a href="news.php" target="myframe">News</a>

</div>
<b class="b4"></b><b class="b3"></b><b class="b2"></b><b class="b1"></b>
</div>
</div>
</div>
</div>

se alguem poder me dar uma luiz ai....

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.