Ver Mensaje Individual
  #1 (permalink)  
Antiguo 28/01/2013, 10:07
davidsuarez82
 
Fecha de Ingreso: enero-2013
Mensajes: 17
Antigüedad: 11 años, 3 meses
Puntos: 0
Pregunta Problema con iframe creado con javascript

Buenas tardes,

Estoy haciendo una web que consta de dos iframes, uno con un menu y el otro donde se va mostrando el contenido y que ajusta su tamaño dependiendo del monitor donde se visualize. En chrome funciona correctamente pero en internet explorer no; aqui me da dos problemas uno es que al hacer click en los enlaces me abre las paginas en una nueva ventana en vez de en el iframe y ademas me lanza dos errores en la barra de estado uno de se esperaba objeto en la linea 41 y otro de valor no definido en la linea 66. Creo que el problema de que los enlaces se abran en una nueva ventana puede estar relacionado con esto. El codigo de la web es el siguiente

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">
<head>

<title>Nueva Web</title>

<meta http-equiv="content-language" content="ES" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<meta http-equiv="content-script-type" content="text/javascript" />
<meta http-equiv="content-style-type" content="text/css" />
<meta name="description" content="Principal" />
<meta name="keywords" content="Principal" />
<meta name="robots" content="all" />
<meta name="author" content="WebBuilder" />
<meta http-equiv="content-script-type" content="text/javascript" />
<meta http-equiv="content-style-type" content="text/css" />

<link href="style.css" rel="stylesheet" type="text/css">
<link href="images/vmenu.css" rel="stylesheet" type="text/css">

<style type="text/css">
body {
	position:absolute;
	background-image: url(images/r_bg.jpg);
	background-repeat: repeat-x;
	overflow:hidden;
	overflow:auto;
}

</style>

<script> 
if (window.innerHeight){ 
   //navegadores basados en mozilla 
   alto_iframe = window.innerHeight - 130
   ancho_iframe = window.innerWidth - 230
}else{ 
   if (document.body.clientHeight){ 
      	//Navegadores basados en IExplorer, es que no tengo innerheight 
      	alto_iframe = document.body.clientHeight - 130
		ancho_iframe = document.body.clientWidth - 130
		 
   }else{ 
      	//otros navegadores 
      	alto_iframe = 500
		ancho_iframe = 1080 
   } 
} 
 
</script>

</head>

<body>

<table width="1313" border="0" cellpadding="2" cellspacing="5" style="position:relative; top:100px;">
  <tr>
    <td width="210" height="513" align="left" valign="top"><iframe src="menu.php" id="menu" name="menu" frameborder="0" width="210" height="450" allowtransparency="true" scrolling="no"></iframe></td>
    
    <td width="1080" align="left" valign="top">
    <script>
	document.write ('<iframe src="1.php" id="contenido" name="contenido" frameborder="0" width="' + ancho_iframe + '" height="' + alto_iframe + '">') 
document.write ('</iframe>') 
	</script>
    
    
<!--    <iframe src="1.php" id="contenido" name="contenido" frameborder="0" width="1080" height="500" allowtransparency="true" scrolling="auto"></iframe>-->
    
    </td>
    
  </tr>
</table>

</body>
</html>