Foros del Web » Creando para Internet » HTML »

abrir con el teclado un pop-up??????????????????

Estas en el tema de abrir con el teclado un pop-up?????????????????? en el foro de HTML en Foros del Web. Yo tengo esta función en un .js que abre un enlace con una tecla: var Navegador = (window.Event) ? 1 : 0 function CompruebaTecla(evento) { ...
  #1 (permalink)  
Antiguo 07/02/2002, 18:54
 
Fecha de Ingreso: octubre-2001
Mensajes: 268
Antigüedad: 22 años, 6 meses
Puntos: 0
abrir con el teclado un pop-up??????????????????

Yo tengo esta función en un .js que abre un enlace con una tecla:

var Navegador = (window.Event) ? 1 : 0

function CompruebaTecla(evento) {
var codigo = Navegador ? evento.which : event.keyCode
var tecla = String.fromCharCode(codigo)
for (var x = 0; x < listaURLs.length; x++) {
if ( tecla == listaURLs[x].tecla )
location.href = listaURLs[x].direccion
}
}

function objetoURL(tecla, direccion) {
this.tecla = tecla
this.direccion = direccion
}

var listaURLs = new Array()

listaURLs[0] = new objetoURL("i", "../../index.htm")
listaURLs[1] = new objetoURL("u", "entrar.php")

if (Navegador)
document.captureEvents(Event.KEYPRESS)
document.onkeypress = CompruebaTecla

esto funciona abriendo el enlace de la tecla en la misma ventana pero lo que quiero conseguir es que lo haga en un pop-up con un tamaño predefinido.

gracias y
Saludos

<html><center><img src="http://www.globalmedialab.com/firma/zpez.jpg" height=79 width=352 border="0" alt= ""></a>
</center></html>
  #2 (permalink)  
Antiguo 07/02/2002, 21:57
 
Fecha de Ingreso: julio-2001
Ubicación: Internet
Mensajes: 1.690
Antigüedad: 22 años, 9 meses
Puntos: 1
Re: abrir con el teclado un pop-up??????????????????

Hola!,

En La Parte Del Codigo Donde Dice:

location.href = listaURLs[x].direccion


Cambiala Por Un window.open()(Genera Los Denominados Pop-up), Poniendo Como URL listaURLs[x].direccion

Mas Informacion Sobre window.open() Para Definir Tamaño, Barras A Mostrar Y Demas En:

http://www.ciudadfutura.com/javascriptdesdecero/dhtml/window/open.htm

<FONT COLOR=gray SIZE=2><I>"Los Temas Mas Sencillos Son Aquellos De Los Que No Se Sabe Nada"</I></FONT>
  #3 (permalink)  
Antiguo 08/02/2002, 09:53
 
Fecha de Ingreso: octubre-2001
Mensajes: 268
Antigüedad: 22 años, 6 meses
Puntos: 0
Re: abrir con el teclado un pop-up??????????????????

jlmm, muchas gracias, voy con ello.

un saludo.

<html><center><img src="http://www.globalmedialab.com/firma/zpez.jpg" height=79 width=352 border="0" alt= ""></a>
</center></html>
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 07:45.