Hi,
I want to disable copy/paste from the HTML panel. I have used
onBrowserEvent method, by using this i am able to disable all mouse
events like selecting and right click on HTML panel. But when i do
'Ctrl A' it selects all the content of the panel. To resolve this
issue i have used one javascript native function to disable text
selection.
function disableSelection(element){
if (typeof element.onselectstart!="undefined"){
element.unselectable = "on";
element.onselectstart=function(){return false}
}else if (typeof element.style.MozUserSelect!="undefined")
element.style.MozUserSelect = "none";
else
element.style.cursor = "default";
element.onmousedown=function(){return false;}
}
This works fine in mozilla but not working in IE. Infect when i do
Ctrl A in mozilla it does not selects text but when i do Ctrl C it
copy all the content of the page.
But in IE Ctrl A itself is not disabling.
Thanks in advance please help me.
Thanks,
Pawan
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---