Ver Mensaje Individual
  #1 (permalink)  
Antiguo 26/01/2013, 18:53
sotelokm
 
Fecha de Ingreso: enero-2013
Mensajes: 2
Antigüedad: 11 años, 3 meses
Puntos: 0
Exclamación Como soluciono el Codigo Javascript no selecionar texto

hola

me pueden ayudar
tengo una pagina de test y me llegan a robar mis contenidos

encontre este maravilloso codigo en google, que hace no selecionar texto

pero el unico detalles que no baja la barra de desplazamiento, en Chrome y en internet explore, pero en Mozilla firefox funciona perfecto

alguien me puede ayudar en este codigo para que funcione bien la barra de desplazamiento en eso 2 navegadores

Código PHP:
</script>
<script type="text/javascript">
// IE Evitar seleccion de texto
document.onselectstart=function(){
if (event.srcElement.type != "text" && event.srcElement.type != "textarea" && event.srcElement.type != "password")
return false
else return true;
};
// FIREFOX Evitar seleccion de texto
if (window.sidebar){
document.onmousedown=function(e){
var obj=e.target;
if (obj.tagName.toUpperCase() == "INPUT" || obj.tagName.toUpperCase() == "TEXTAREA" || obj.tagName.toUpperCase() == "PASSWORD")
return true;
/*else if (obj.tagName=="BUTTON"){
return true;
}*/
else
return false;
}
}
// End --></script> 
gracias