Ver Mensaje Individual
  #1 (permalink)  
Antiguo 03/08/2011, 09:26
Pelirr
 
Fecha de Ingreso: diciembre-2008
Mensajes: 233
Antigüedad: 15 años, 4 meses
Puntos: 1
problema <iframe> que tapa un <div>

Hola, tengo una etiqueta <iframe> en mi jsp, en la parte de abajo. En la parte de arriva tengo unas etiquetas <div>, una con un menú, otra con una imágen, etc. Mi problema es que una vez se carga el <iframe>, si yo pincho en el menú desplegable de la parte superior de la jsp, se queda por debajo del <iframe> y no puedo ver el menú, me lo tapa el <iframe>. He estado mirando en internet, y hay soluciones como utilizar la propiedad z-index de los <div> para que se vea el menu por encima, o la propiedad allowtransparency="allowtransparency" dentro del <iframe>, pero o no sé como ponerlo o no me funciona. Aquí os dejo el código de la jsp a ver si alguien me puede orientar:

Código HTML:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ page contentType="text/html; charset=utf-8" %>

<html xmlns="http://www.w3.org/1999/xhtml">

	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>AODB</title>
		
		<link href="../../web/css/ui-lightness/jquery-ui-1.8.12.custom.css" rel="stylesheet" type="text/css" />
		<link href="../../web/css/login.css" rel="stylesheet" type="text/css" />
		<link href="../../web/css/dropdown/dropdown.css" media="all" rel="stylesheet" type="text/css" />
		<link href="../../web/css/dropdown/themes/default/default.ultimate.css" media="all" rel="stylesheet" type="text/css" />
		<link href="../../web/css/Clistados.css" rel="stylesheet" type="text/css" />
		
		<script type="text/javascript" src="<s:url value="/js/jquery-1.4.2.min.js"/>"></script>
		<script type="text/javascript" src="<s:url value="/js/jquery-ui-1.8.12.custom.min.js"/>"></script>
		<script type="text/javascript" src="<s:url value="/js/comun.js"/>"></script>
		
		<script type="text/javascript">

			function searchReport()
			{
				var typeList = '<s:property value="%{typeList}" />';
				//comprobamos que la fecha tenga el formato adecuado
				var fechaValida = "";
				var fechaAComprobar = document.getElementById("reportDate").value;
		  		if (fechaAComprobar != "" )
		  		{
		  			fechaValida = validarFechaSinHora (fechaAComprobar);

		  			if (fechaValida == "true" || fechaValida == "")
					{
		  				var operacionSeleccionada = $(document).find('#selectOperacion').val();
		  				var titulo = '';
		  				if (operacionSeleccionada == 'todas')
		  				{
			  				if (typeList == "operacionesDiarias")
			  				{
		  						titulo = "<s:text name="reportTitleDailyOperations"/>";
			  				}
			  				if (typeList == "mediosDiarios")
			  				{
			  					titulo = "<s:text name="reportTitleDailyResources"/>";
			  				}
		  				}
		  				if (operacionSeleccionada == 'llegadas')
		  				{
		  					if (typeList == "operacionesDiarias")
			  				{
		  						titulo = "<s:text name="reportTitleDailyArrOperations"/>";
			  				}
			  				if (typeList == "mediosDiarios")
			  				{
				  				titulo = "<s:text name="reportTitleDailyArrResources"/>";
			  				}
		  				}
		  				if (operacionSeleccionada == 'salidas')
		  				{
			  				if (typeList == "operacionesDiarias")
			  				{
		  						titulo = "<s:text name="reportTitleDailyDepOperations"/>";
			  				}
			  				if (typeList == "mediosDiarios")
			  				{
			  					titulo = "<s:text name="reportTitleDailyDepResources"/>";
			  				}
		  				}
		  				var nombresParametros = '&tituloInforme='+ titulo + 
												'&compania='+ encodeURIComponent("<s:text name="reportTextAirline"/>")+
												'&numeroVuelo='+ encodeURIComponent("<s:text name="reportTextFlightNumber"/>")+ 
												'&fechaProgramada='+ "<s:text name="reportTextScheduledDate"/>"+
												'&estadoActual='+ "<s:text name="reportTextStatus"/>"+
												'&tipoVuelo='+ "<s:text name="reportFlightType"/>"+
												'&tipoAeronave='+ "<s:text name="reportAircraftType"/>"+
												'&numeroAsientos='+ encodeURIComponent("<s:text name="reportNumberSeats"/>")+
												'&numeroPasajeros='+ encodeURIComponent("<s:text name="reportNumberPassenger"/>")+
												'&ocupacion='+ encodeURIComponent("<s:text name="reportOccupancy"/>")+
												'&emptyReport='+ encodeURIComponent("<s:text name="emptyReport"/>") +
												'&maintenance=' + encodeURIComponent("<s:text name="reportMaintenance"/>") + 
												'&startDate=' + encodeURIComponent("<s:text name="reportStartDateMaintenance"/>") +
												'&endDate=' + encodeURIComponent("<s:text name="reportEndDateMaintenance"/>");
						
  						document.getElementById('informe').innerHTML = '<iframe name="informeFrame"  width="1520" height="550"></iframe>';
  						window.parent.frames["informeFrame"].location="/AODB/operacionesDiariasYMens.servlet?reportDateString="+fechaAComprobar+"&typeOperation="+operacionSeleccionada +
  																		"&typeList=" + typeList + nombresParametros;
						//no se podría poner en este caso "<iframe src='/AODB/operacionesDiariasYMens.servlet?reportDateString='+variables width='1400' height='550'></iframe>"
						//debido a las comillas (tanto ' como  "), interfieren y no coge las variables para llevarla al action o al servlet
					}
					else
					{
						if (fechaValida == "errorFormatDateWithoutHour")
						{
							alert("<s:text name="errorFormatDateWithoutHour"/>");
						}
						if (fechaValida == "errorYear")
						{
							alert("<s:text name="errorYear"/>");
						}
						if (fechaValida == "errorMonth")
						{
							alert("<s:text name="errorMonth"/>");
						}
						if (fechaValida == "errorDayOfWeek")
						{
							alert("<s:text name="errorDayOfWeek"/>");
						}
					}
		  		}
		  		else
		  		{
		  			alert("<s:text name="reportDateRequired"/>");
		  		}

				
			}
			
		</script>
		
	</head>

	<body>
		<div id="contenedor">
			<div id="cabecera">
   				<div id="logo">
            		<s:include value="../../jsp/application/menu.jsp"/>
    			</div>
    		</div>	    		
		
			<div id="contenido">
				<div id="info"></div> 
				<div id="banner"></div>
				<div width="95%" align="center">										
					<div width="100%">
						<s:form>
							<table width="100%" border="0" cellspacing="0" cellpadding="0">
								<tr height="50px" width="100%">
									<td width="20%" align="center">
										<s:text name="reportDateSelected"/>
									</td>
									<td width="25%" align="center">
										<s:textfield id="reportDate" name="reportDate" maxlength="10" />
									</td>
									<script>
										var fecha = '<s:date name="%{reportDate}" format="dd/MM/yyyy" />';
										document.forms[0].reportDate.value = fecha;
									</script>	
									<td width="15%" align="center">
										<s:text name="typeFlightSelected"/>
									</td>
									<td width="30%" align="center">
										<s:select name="typeOperation" list="tipoOperacionElegida" value="value" id="selectOperacion"/>
									</td>								
									<td width="10%">
										<s:a href="#" onclick="javascript:searchReport()"><img src="../../web/images/icono_buscar.png" alt="<s:text name="reportSearchButton" />" border="0"/></s:a>
									</td>
								</tr>
							</table>
						</s:form>
					</div>
					<div id="informe">
					</div>
				</div>			
			</div>				
		</div>		
	</body>
	
</html> 
Muchas gracias, un saludo