HTML - iframe

 
Vista:

iframe

Publicado por mariaanie (1 intervención) el 05/12/2008 08:50:45
Hola buenas tengo un pequeño problema con un iframe, resulta que yo tengo una web maquetada en tablas, en una de las celdas tengo incluido un iframe (que contiene otra parte de la web)que se refesca cada 20 segundos, el problema es que en el iframe tengo un enlace que me saca una ventana, pero al sacarla, solo me la saca en la zona que representa el iframe y yo quiero que esa ventana ocupe todo

este es mi codigo javascript:

<script>
$("infoFrame").style.width="${initParam.InfoFrameWidth}" //"950px";//"749px";
$("infoFrame").style.height="${initParam.InfoFrameHeight}" // 596px
if (document.all){
$("infoBackground").style.width=document.body.scrollWidth
$("infoBackground").style.height=document.body.scrollHeight
}
function cerrarVentanaImagen(){
$("infoBackground").hide();
$("infoFrame").hide();
$("controles").hide();

}
function cargarhistorico(){
$("infoFrame").src="historico.jsp";
$("infoBackground").show();
$("infoFrame").show();
$("controles").show();
}

</script>

estas son las etiquetas:

<div id="infoBackground" style="display:none;
position:absolute;top:0;left:0;bottom:0;right:0;opacity:.5;background-color:black;filter: alpha(opacity=50);">
</div>
<!--div style="position:absolute;top:1em;width:950px;left:2em;background-color:#00f;height:1.5em;border:0;padding:0" onclick="$('infoBackground').hide()"></div -->
<iframe id="infoFrame" style="opacity:1;position:absolute;
top:1em;
left:1.5em;bottom:1em;right:1em;
display:none;
width:${initParam.mapSizeW};height:${initParam.mapSizeH};
background-color:white;border:0;" src="" >
</iframe>
<div id="controles" style="display:none;position:absolute; top:360px; left:5%;
width:80%;height:2em;
padding:2em;text-align:center;background-color:white;">
<input type="button" onclick="anterior()" value="Anterior" style="text-align:center; border: 1px solid gray;"/>
<input type="button" onclick="cerrarVentanaImagen()" value="Cerrar" style="width:10em;text-align:center; border: 1px solid gray;" />
<input type="button" onclick="siguiente()" value="Siguiente" style="text-align:center; border: 1px solid gray;" />
</div>

este es el enlace que tengo dentro del iframe

<a href="#" onclick="javascript:cargarhistorico()" style="float:left; color:blue;text-decoration:none;padding-left:1em;">Acceso a Historicos</a>
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder
Imágen de perfil de Be7or

RE:iframe

Publicado por Be7or (31 intervenciones) el 05/12/2008 20:49:16
Hola,

Mira te dejo un ejemplo

--PRINCIPAL--

<html>
<body>
<table>
<tr>
<td>
IFRAME
</td>
</tr>
<tr>
<td>
<IFRAME marginWidth=0 marginHeight=0 src="if.htm" frameBorder=0 noResize width=450 scrolling=no height=55></IFRAME>
</td>
</tr>
</table>
</body>
</html>

--if.htm--

<script>
function l(){
top.location = "http://www.google.com";
}
</script>
<a onclick="l()" href="#">link</a>

Saludos!
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar