Foros del Web » Programando para Internet » Javascript »

Crear capas tipo popups y centrarlas

Estas en el tema de Crear capas tipo popups y centrarlas en el foro de Javascript en Foros del Web. Hola amigos encontre este script para crear capas tipo popups todo funciona padre ,pero el poblema es que quiero centrar las capas sin importar la ...
  #1 (permalink)  
Antiguo 28/04/2005, 10:01
Avatar de chalchis  
Fecha de Ingreso: julio-2003
Mensajes: 1.773
Antigüedad: 20 años, 9 meses
Puntos: 21
Pregunta Crear capas tipo popups y centrarlas

Hola amigos encontre este script para crear capas tipo popups
todo funciona padre ,pero el poblema es que quiero centrar las capas
sin importar la resolucion de pantalla.

aqui les mando el js y el llamado de las funciones

espero sus comentarios

<html>
<head>
<title>Popup Windows (V 4.5)</title>
<script language="javascript" src="popup.js"></script>

<style type="text/css">

a, a:active, a:visited {
color:#00436e;
font:bold 8pt verdana;
text-decoration:none;
}

a:hover {
color:black;
font:bold 8pt verdana;
text-decoration:underline;
}

body {
background-color:white;
font-size:8pt;
font-family:verdana;
color:black;
padding:10 20 10 20;
}

td{
font-size:9pt;
font-family:verdana;
color:black;
}

pre, .pre{
font-size:10px;
font-family:courier;
color:black;
font-weight:normal;
}

</style>


<script language="javascript">

//*****************************
//****** EXAMPLE WINDOWS ******
//*****************************

window.onload=function(){

// POPUP EXAMPLE 2
new popUp(200, 480, 370, 175, "Div2", "OK, so these things are pretty neat, but of course they <b>do</b> have a few limitations.<br><br><ol><li>These only work in IE5+ and NS6+. In NS4.x and IE4.x, the script will just open a regular window with most of the settings you specified.<br><br><li>Any windows that are pre-defined have to be created <b>once the page is done loading</b>.<br>So, put all your pre-defined ones in a window.onload function.<li>Technically, there are no limits to the number of windows on a page, but the browser may get sluggish if there are too many, so use judgement.<br><br><li>The minimum width allowed is 100 pixels and the minimum height allowed is 80 pixels. Any attempt to go smaller will be ignored. Any titlebar text that exceeds the allotted width will be chopped to fit.</ol>Any other information can be found by reading this demo page in its entirety.<br>", "#00385c", "lightgrey", "9pt sans-serif", "Div2", "#0084d8", "lightgrey", "gray", "#00468c", "black", true, true, true, true, false, false,'min.gif','max.gif','close.gif','resize.gif' );

// POPUP EXAMPLE 1

new popUp(10, 10, 212, 300, "Div1", "Each of these popup windows can have very different settings. For instance, this window cannot be dragged or resized, but the others can. Take a look at the various colors and fonts used in each one. Read below for the features and instructions.", "white", "#00385c", "16pt serif", "Div1555", "#00385c", "white", "lightgrey", "#00568c", "black", false, false, false, true, false, false,'','','cir_close.gif','resize.gif');

// POPUP EXAMPLE 3
new popUp(450, 520, 300, 200, "Div3", "test_1.html", "white", "#00385c", "16pt serif", "Div3 (External HTML Page)", "#00385c", "white", "lightgrey", "#00568c", "black", true, true, true, true, true, false,'ar_min.gif','ar_max.gif','ar_close.gif','re size.gif');


fadeboxin('Div1')
}
</script>

</head>
<body>
<a href="javascript:fadeboxin('Div1')"><span class="pre">fadeboxin('Div1')</span></a>
</body>
</html>


el js lo pueden descargar desde aqui:
http://scriptasylum.com/popup.js
__________________
gerardo
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 11:44.