Wrox Programmer Forums
|
Classic ASP Espanol Esta es una lista de correo dedicada al intercambio de conocimiento sobre ASP 3 en el idioma español.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Espanol section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 10th, 2003, 12:57 PM
Registered User
 
Join Date: Nov 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default abrir ventanas

Necesito abrir una ventana desde una pagina aspx. En
dicha ventana quiero sacar un datagrid leyendo de una base
de datos, para que se seleccione un registro y devolverlo
al formulario anterior. Mi problema es que no se como
abrir esa ventana con un determinado tamaño y posición,
sin barra de herramientas, etc y que no se pueda salir de
ella sin seleccionar.
Intento poner una funcion javascript para abrir una ventana
ventana(){
mi_ventana=window.open("WebForm1.aspx","Ayuda","wi dth=300,height=400,status=yes,directories=no,toolb ar=no,location=no,menubar=no,scrollbar=no,resizabl e=no");
}
pero no se ni como llamarla.
¿Hay otro método mejor?
Muchas gracias.


 
Old January 9th, 2004, 03:27 PM
Registered User
 
Join Date: Jan 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

<a href="javascript:ventana()"> o
<a href="javascript:ventana();mi_ventana">

 
Old April 10th, 2004, 01:30 PM
Authorized User
 
Join Date: Apr 2004
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default

pega esto entre <head> y </head>:

<script language="javascript">
var win= null;
function ventana(pagina,titulo,ancho,alto,scroll)
{var winl = (screen.width-ancho)/2; var wint = ((screen.height-alto)/2)-60; var opciones ='height='+alto+',';
opciones +='width='+ancho+',';opciones +='top='+wint+',';opciones +='left='+winl+',';opciones +='border=no'+',';
opciones +='scrollbars='+scroll+',';opciones +='resizable=no';win=window.open(pagina,titulo,opc iones);
if(parseInt(navigator.appVersion) >= 4){win.window.focus();}}
</script>
Puedes llamar al esta funcion por ejemplo así:
<a href="javascript:ventana('pagina.html','Listado',' 610','520','yes');">Pincha para ver listado</a>

Un saludo

www.dualnet.net









Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.