Ver Mensaje Individual
  #6 (permalink)  
Antiguo 14/04/2007, 12:00
yoelnacho
 
Fecha de Ingreso: diciembre-2006
Mensajes: 28
Antigüedad: 17 años, 4 meses
Puntos: 0
Re: cambiar atributos de un tag html

claro, yo lo que quiero hacer es variar la altura del iframe.
Encontré en internet un scrip hecho en java, y funciona tanto en Firefox, con en IE, pero no en opera. La única forma de hacerlo funcionar en Opera, es cambiando la página a cargar en el atributo src del iframe.
Acá te dejo el código completo, con los arreglos que le hice. Fijate de que se trata, ya que sabes un %99,9 más que yo de programación, jajaja.

CODIGO:

<html>
<head>
<title>prueba</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>

<!--scirpt de regulación altura iframe-->
<script language="JavaScript">
<!--
function calcHeight()
{
//find the height of the internal page
//Acá empieza el código para regular el iFrame
var the_height=
document.getElementById('the_iframe').contentWindo w.
document.body.scrollHeight;

//change the height of the iframe
document.getElementById('the_iframe').height=
the_height;
}
//-->
</script>
</head>

<body >
<table width="500" border="0" cellspacing="0" cellpadding="0">
<tr><!--script del flash-->
<td><script type="text/javascript">
AC_FL_RunContent( 'codebase','download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0','width','500','heigh t','50','title','23','src','botones2','quality','h igh','pluginspage','macromedia.com/go/getflashplayer','movie','botones2' ); //end AC code
</script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="500" height="50" title="23">
<param name="movie" value="botones2.swf">
<param name="quality" value="high">
<embed src="botones2.swf" quality="high" pluginspage="macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="500" height="50"></embed>
</object></noscript></td>
</tr>
<tr>
<td>

<!--comienza el iframe-->
<iframe
onLoad="calcHeight();"
width="500"
id="the_iframe"
name="the_iframe"
marginheight="0"
marginwidth="0"
scrolling="NO"
frameborder="1"
height="10"
src="<? echo $_GET['src'];?>" >
</iframe>
</td>
</tr>
</table>
</body>
</html>

Última edición por yoelnacho; 14/04/2007 a las 12:06