Foros del Web » Programando para Internet » Jquery »

[SOLUCIONADO] ¿Como abro un documento en nueva ventana en pantalla completa(jquery)?

Estas en el tema de ¿Como abro un documento en nueva ventana en pantalla completa(jquery)? en el foro de Jquery en Foros del Web. ¿Se puede abrir un documento en nueva ventana(jquery) sin tener que especificarle ancho y alto? Tengo este codigo: Código: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 ...
  #1 (permalink)  
Antiguo 14/01/2013, 20:39
 
Fecha de Ingreso: noviembre-2012
Ubicación: en casa
Mensajes: 150
Antigüedad: 11 años, 5 meses
Puntos: 1
Pregunta ¿Como abro un documento en nueva ventana en pantalla completa(jquery)?

¿Se puede abrir un documento en nueva ventana(jquery) sin tener que especificarle ancho y alto?
Tengo este codigo:
Código:
  
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 

<title>Documento sin título</title> 
<script type="text/javascript" src="js/jquery.js"></script> 

 <script type="text/javascript"> 
            var windowSizeArray = [ "width=200,height=200", 
                                    "width=300,height=400,scrollbars=yes" ]; 
  
            $(document).ready(function(){ 
                $('.newWindow').click(function (event){ 
  
                    var url = $(this).attr("href"); 
                    var windowName = "popUp";//$(this).attr("name"); 
                    var windowSize = windowSizeArray[$(this).attr("rel")]; 
  
                    window.open(url, windowName, windowSize); 
  
                    event.preventDefault(); 
  
                }); 
            }); 
        </script> 

</head> 

<body> 
<a href="http://www.mnswf.com/" rel="1" class="newWindow" >abrir en ventana nueva</a>
</body> 

</html>
  #2 (permalink)  
Antiguo 15/01/2013, 06:44
Avatar de emprear
Colaborador
 
Fecha de Ingreso: junio-2007
Ubicación: me mudé
Mensajes: 8.388
Antigüedad: 16 años, 9 meses
Puntos: 1567
Respuesta: ¿Como abro un documento en nueva ventana en pantalla completa(jquery)?

ni falta haría jQuery para eso, pero bueno
Código HTML:
Ver original
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5.  
  6. <title>Documento sin título</title>
  7. <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
  8.  <script type="text/javascript">
  9.             $(document).ready(function(){
  10.                 $('.newWindow').click(function (event){
  11.                    event.preventDefault();
  12.                    var url = $(this).attr("href");
  13.                     var windowName = "popUp";
  14.                     var caracteristicas = 'height='+screen.height+',width='+screen.width+ ',scrollbars=yes';
  15.                     window.open(url, windowName, caracteristicas);
  16.                 });
  17.             });
  18.         </script>
  19.  
  20. </head>
  21.  
  22. <body>
  23. <a href="http://www.mnswf.com/" rel="1" class="newWindow">abrir en ventana nueva</a>
  24. </body>
  25.  
  26. </html>

Saludos
__________________
La voz de las antenas va, sustituyendo a Dios.
Cuando finalice la mutación, nueva edad media habrá
S.R.
  #3 (permalink)  
Antiguo 29/01/2013, 13:31
 
Fecha de Ingreso: noviembre-2012
Ubicación: en casa
Mensajes: 150
Antigüedad: 11 años, 5 meses
Puntos: 1
Respuesta: ¿Como abro un documento en nueva ventana en pantalla completa(jquery)?

Cita:
Iniciado por emprear Ver Mensaje
ni falta haría jQuery para eso, pero bueno
Código HTML:
Ver original
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5.  
  6. <title>Documento sin título</title>
  7. <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
  8.  <script type="text/javascript">
  9.             $(document).ready(function(){
  10.                 $('.newWindow').click(function (event){
  11.                    event.preventDefault();
  12.                    var url = $(this).attr("href");
  13.                     var windowName = "popUp";
  14.                     var caracteristicas = 'height='+screen.height+',width='+screen.width+ ',scrollbars=yes';
  15.                     window.open(url, windowName, caracteristicas);
  16.                 });
  17.             });
  18.         </script>
  19.  
  20. </head>
  21.  
  22. <body>
  23. <a href="http://www.mnswf.com/" rel="1" class="newWindow">abrir en ventana nueva</a>
  24. </body>
  25.  
  26. </html>

Saludos
funciona

Última edición por usuarioxr; 28/02/2013 a las 00:04

Etiquetas: completa, javascript, ventanas
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 17:43.