desactivar Ctrl+P

22/07/2004 - 18:47 por Edil | Informe spam
hola a todos

Puedo desactivar el "ctrl+p" de una pagina para evitar la
impresion??? javascript??

alguna idea???

gracias

Preguntas similare

Leer las respuestas

#1 Franco Figún
22/07/2004 - 19:07 | Informe spam
Colocar estos en paginas HTML:
<Script language="JavaScript" src="security.js"></script>

Crear un archivo JS con este codigo:

var isnn,isie
if(navigator.appName=='Microsoft Internet Explorer') //check the browser
{ isie=true }

if(navigator.appName=='Netscape')
{ isnn=true }

function right(e) //to trap right click button
{
if (isnn && (e.which == 3 || e.which == 2 ))
return false;
else if (isie && (event.button == 2 || event.button == 3))
{
alert("ACCESO DENEGADO");
return false;
}
return true;
}

function key(k)
{
if(isie) {
if(event.keyCode= || event.keyCode= || event.keyCode=“) {
alert("ACCESO DENEGADO")
return false;
}
}

if(isnn){
alert("ACCESO DENEGADO")
return false; }
}

if (document.layers) window.captureEvents(Event.KEYPRESS);
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
if (document.layers) window.captureEvents(Event.MOUSEUP);
document.onkeydown=key;
document.onmousedown=right;
document.onmouseup=right;
window.document.layers=right;


FF
www.francofigun.com.ar
MSN:
Yahoo MSN:
"Edil" wrote in message
news:23b301c4700b$a3a3d1f0$
hola a todos

Puedo desactivar el "ctrl+p" de una pagina para evitar la
impresion??? javascript??

alguna idea???

gracias
Respuesta Responder a este mensaje
#2 Matias Iacono
22/07/2004 - 20:27 | Informe spam
Personalmente, te recomiendo que cuando uses esta clase de controles no uses
ALERT para mandar mensajes...

Ya que si eres rapido puedes romper el script.

Esto es, apretas el boton derecho, te sale la ventana, apretas enter la
ventana se cierra y nuevamente apretas el boton derecho.

Si haces esto rapidamente, se salta la ventana del anuncio y te aprece el
menu del IE.

Saludos

Matias Iacono
Microsoft MVP



"Franco Figún" wrote in message
news:%
Colocar estos en paginas HTML:
<Script language="JavaScript" src="security.js"></script>

Crear un archivo JS con este codigo:

var isnn,isie
if(navigator.appName=='Microsoft Internet Explorer') //check the browser
{ isie=true }

if(navigator.appName=='Netscape')
{ isnn=true }

function right(e) //to trap right click button
{
if (isnn && (e.which == 3 || e.which == 2 ))
return false;
else if (isie && (event.button == 2 || event.button == 3))
{
alert("ACCESO DENEGADO");
return false;
}
return true;
}

function key(k)
{
if(isie) {
if(event.keyCode= || event.keyCode= || event.keyCode=“) {
alert("ACCESO DENEGADO")
return false;
}
}

if(isnn){
alert("ACCESO DENEGADO")
return false; }
}

if (document.layers) window.captureEvents(Event.KEYPRESS);
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
if (document.layers) window.captureEvents(Event.MOUSEUP);
document.onkeydown=key;
document.onmousedown=right;
document.onmouseup=right;
window.document.layers=right;


FF
www.francofigun.com.ar
MSN:
Yahoo MSN:
"Edil" wrote in message
news:23b301c4700b$a3a3d1f0$
> hola a todos
>
> Puedo desactivar el "ctrl+p" de una pagina para evitar la
> impresion??? javascript??
>
> alguna idea???
>
> gracias


Respuesta Responder a este mensaje
#3 Jhonny Vargas P.
22/07/2004 - 20:50 | Informe spam
También puedes pegar el texto e imprimirlo de otro lado..

Lo mejor es no complicarse y dejar que el usuario haga lo que quiera, total
para eso es el browser.


Saludos,
Jhonny Vargas P. [MVP]
Santiago de Chile
http://msmvps.com/jvargas



"Matias Iacono" escribió en el mensaje
news:%
Personalmente, te recomiendo que cuando uses esta clase de controles no


uses
ALERT para mandar mensajes...

Ya que si eres rapido puedes romper el script.

Esto es, apretas el boton derecho, te sale la ventana, apretas enter la
ventana se cierra y nuevamente apretas el boton derecho.

Si haces esto rapidamente, se salta la ventana del anuncio y te aprece el
menu del IE.

Saludos

Matias Iacono
Microsoft MVP



"Franco Figún" wrote in message
news:%
> Colocar estos en paginas HTML:
> <Script language="JavaScript" src="security.js"></script>
>
> Crear un archivo JS con este codigo:
>
> var isnn,isie
> if(navigator.appName=='Microsoft Internet Explorer') //check the browser
> { isie=true }
>
> if(navigator.appName=='Netscape')
> { isnn=true }
>
> function right(e) //to trap right click button
> {
> if (isnn && (e.which == 3 || e.which == 2 ))
> return false;
> else if (isie && (event.button == 2 || event.button == 3))
> {
> alert("ACCESO DENEGADO");
> return false;
> }
> return true;
> }
>
> function key(k)
> {
> if(isie) {
> if(event.keyCode= || event.keyCode= || event.keyCode=“) {
> alert("ACCESO DENEGADO")
> return false;
> }
> }
>
> if(isnn){
> alert("ACCESO DENEGADO")
> return false; }
> }
>
> if (document.layers) window.captureEvents(Event.KEYPRESS);
> if (document.layers) window.captureEvents(Event.MOUSEDOWN);
> if (document.layers) window.captureEvents(Event.MOUSEUP);
> document.onkeydown=key;
> document.onmousedown=right;
> document.onmouseup=right;
> window.document.layers=right;
>
>
> FF
> www.francofigun.com.ar
> MSN:
> Yahoo MSN:
> "Edil" wrote in message
> news:23b301c4700b$a3a3d1f0$
> > hola a todos
> >
> > Puedo desactivar el "ctrl+p" de una pagina para evitar la
> > impresion??? javascript??
> >
> > alguna idea???
> >
> > gracias
>
>


Respuesta Responder a este mensaje
#4 Edil
22/07/2004 - 21:24 | Informe spam
Disculpa pero cada quien tiene sus necesidades!!!!

También puedes pegar el texto e imprimirlo de otro lado..

Lo mejor es no complicarse y dejar que el usuario haga lo


que quiera, total
para eso es el browser.


Saludos,
Jhonny Vargas P. [MVP]
Santiago de Chile
http://msmvps.com/jvargas



"Matias Iacono" escribió en el


mensaje
news:%
Personalmente, te recomiendo que cuando uses esta clase




de controles no
uses
ALERT para mandar mensajes...

Ya que si eres rapido puedes romper el script.

Esto es, apretas el boton derecho, te sale la ventana,




apretas enter la
ventana se cierra y nuevamente apretas el boton derecho.

Si haces esto rapidamente, se salta la ventana del




anuncio y te aprece el
menu del IE.

Saludos

Matias Iacono
Microsoft MVP



"Franco Figún" wrote in




message
news:%
> Colocar estos en paginas HTML:
> <Script language="JavaScript"




src="security.js"></script>
>
> Crear un archivo JS con este codigo:
>
> var isnn,isie
> if(navigator.appName=='Microsoft Internet




Explorer') //check the browser
> { isie=true }
>
> if(navigator.appName=='Netscape')
> { isnn=true }
>
> function right(e) //to trap right click button
> {
> if (isnn && (e.which == 3 || e.which == 2 ))
> return false;
> else if (isie && (event.button == 2 || event.button




== 3))
> {
> alert("ACCESO DENEGADO");
> return false;
> }
> return true;
> }
>
> function key(k)
> {
> if(isie) {
> if(event.keyCode= || event.keyCode= ||




event.keyCode=“) {
> alert("ACCESO DENEGADO")
> return false;
> }
> }
>
> if(isnn){
> alert("ACCESO DENEGADO")
> return false; }
> }
>
> if (document.layers) window.captureEvents




(Event.KEYPRESS);
> if (document.layers) window.captureEvents




(Event.MOUSEDOWN);
> if (document.layers) window.captureEvents




(Event.MOUSEUP);
> document.onkeydown=key;
> document.onmousedown=right;
> document.onmouseup=right;
> window.document.layers=right;
>
>
> FF
> www.francofigun.com.ar
> MSN:
> Yahoo MSN:
> "Edil" wrote in




message
> news:23b301c4700b$a3a3d1f0$
> > hola a todos
> >
> > Puedo desactivar el "ctrl+p" de una pagina para




evitar la
> > impresion??? javascript??
> >
> > alguna idea???
> >
> > gracias
>
>






.

Respuesta Responder a este mensaje
#5 Edil
22/07/2004 - 21:38 | Informe spam
Hola Franco.

Cual es el numero de la tecla "impr pant" o "print scr"
para colocarlo en el código????

gracias
Colocar estos en paginas HTML:
<Script language="JavaScript" src="security.js"></script>

Crear un archivo JS con este codigo:

var isnn,isie
if(navigator.appName=='Microsoft Internet


Explorer') //check the browser
{ isie=true }

if(navigator.appName=='Netscape')
{ isnn=true }

function right(e) //to trap right click button
{
if (isnn && (e.which == 3 || e.which == 2 ))
return false;
else if (isie && (event.button == 2 || event.button ==


3))
{
alert("ACCESO DENEGADO");
return false;
}
return true;
}

function key(k)
{
if(isie) {
if(event.keyCode= || event.keyCode= ||


event.keyCode=“) {
alert("ACCESO DENEGADO")
return false;
}
}

if(isnn){
alert("ACCESO DENEGADO")
return false; }
}

if (document.layers) window.captureEvents(Event.KEYPRESS);
if (document.layers) window.captureEvents


(Event.MOUSEDOWN);
if (document.layers) window.captureEvents(Event.MOUSEUP);
document.onkeydown=key;
document.onmousedown=right;
document.onmouseup=right;
window.document.layers=right;


FF
www.francofigun.com.ar
MSN:
Yahoo MSN:
"Edil" wrote in


message
news:23b301c4700b$a3a3d1f0$
hola a todos

Puedo desactivar el "ctrl+p" de una pagina para evitar




la
impresion??? javascript??

alguna idea???

gracias




.

Respuesta Responder a este mensaje
Ads by Google
Help Hacer una preguntaSiguiente Respuesta Tengo una respuesta
Search Busqueda sugerida