Ayuda, necesito imprimir el contenido de una capa(Layer)

27/07/2005 - 01:44 por Wicho Saenz | Informe spam
Tengo el siguiente codigo:
Tengo el siguiente codigo:

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Documento sin t&iacute;tulo</title>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if
((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight;
onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH)
location.reload();
}
MM_reloadPage(true);
//-->
</script>
</head>

<body>
<div id="Layer1" style="position:absolute; left:12px; top:21px; width:700px;
height:64px; z-index:1">
<div align="center">
<h1><strong>Cabecera</strong></h1>
</div>
</div>
<div id="Layer2" style="position:absolute; left:12px; top:88px; width:700px;
height:275px; z-index:2; overflow: scroll;">
<p><strong>Inicio Contenido</strong></p>
<p>.</p>
<p>.</p>
<p>.</p>
<p>.</p>
<p>.</p>
<p>.</p>
<p>.</p>
<p>.</p>
<p>.</p>
<p>.</p>
<p>.</p>
<p>.</p>
<p>.</p>
<p>.</p>
<p>.</p>
<p>.</p>
<p>.</p>
<p>.</p>
<p>.</p>
<p>.</p>
<p>.</p>
<p>.</p>
<p>.</p>
<p>.</p>
<p>.</p>
<p>.</p>
<p>.</p>
<p>.</p>
<p>.</p>
<p><strong>final de contenido </strong></p>
</div>
</body>
</html>


Si corren esta pagina, resulta que es un ejemplo de uso de capas (layers).
Mi problema y/o duda radica en que requiero imprimir solo el contenido de lo
que hay dentro dela capa o Layer.
Estoy trabajando plantillas y mi contenido de todas las paginas estan
metidas dentro de un layer.
Porque dentro de un layer, porque en el layer cabecera tengo mi menu
diseñado en fireworks, y las opciones del menu se sobre enciman de la capa
contenido.
Si uso Frames, mi menu no se encimaria del frame contenido y tendria un
desperdicio barbaro de pantalla
¿como indicar que requiero imprimir lo interior de una capa en especial? que
instruccion en VBscript o Javascript para hacer esto:

Gracias

Wicho Saenz
 

Leer las respuestas

#1 Pantxo
27/07/2005 - 09:37 | Informe spam
Lo único que se me ocurre es que utilices una ventana para copiar el
contenido e imprimirlo:

function imprimir(){
nvent=window.open('about:blank','ventp','width=1,height=1');
window.focus();
nvent.document.open();
nvent.document.write(Layer2.innerHTML);
nvent.document.close();
nvent.print();
}

Un saludo

Pantxo

"Wicho Saenz" escribió en el mensaje
news:%23z%
Tengo el siguiente codigo:
Tengo el siguiente codigo:

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Documento sin t&iacute;tulo</title>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if
((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight;
onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH)
location.reload();
}
MM_reloadPage(true);
//-->
</script>
</head>

<body>
<div id="Layer1" style="position:absolute; left:12px; top:21px;


width:700px;
height:64px; z-index:1">
<div align="center">
<h1><strong>Cabecera</strong></h1>
</div>
</div>
<div id="Layer2" style="position:absolute; left:12px; top:88px;


width:700px;
height:275px; z-index:2; overflow: scroll;">
<p><strong>Inicio Contenido</strong></p>
<p>.</p>
<p>.</p>
<p>.</p>
<p>.</p>
<p>.</p>
<p>.</p>
<p>.</p>
<p>.</p>
<p>.</p>
<p>.</p>
<p>.</p>
<p>.</p>
<p>.</p>
<p>.</p>
<p>.</p>
<p>.</p>
<p>.</p>
<p>.</p>
<p>.</p>
<p>.</p>
<p>.</p>
<p>.</p>
<p>.</p>
<p>.</p>
<p>.</p>
<p>.</p>
<p>.</p>
<p>.</p>
<p>.</p>
<p><strong>final de contenido </strong></p>
</div>
</body>
</html>


Si corren esta pagina, resulta que es un ejemplo de uso de capas (layers).
Mi problema y/o duda radica en que requiero imprimir solo el contenido de


lo
que hay dentro dela capa o Layer.
Estoy trabajando plantillas y mi contenido de todas las paginas estan
metidas dentro de un layer.
Porque dentro de un layer, porque en el layer cabecera tengo mi menu
diseñado en fireworks, y las opciones del menu se sobre enciman de la capa
contenido.
Si uso Frames, mi menu no se encimaria del frame contenido y tendria un
desperdicio barbaro de pantalla
¿como indicar que requiero imprimir lo interior de una capa en especial?


que
instruccion en VBscript o Javascript para hacer esto:

Gracias

Wicho Saenz


Preguntas similares