This script works fine on all other browsers except in Opera, if you drag mouse a little above the (starting of essay) "Evliliğe Dair" then the text can be selected. How to fix this flaw?
http://www.aymavisi.org/makale/Evlil...20Gibran).html
Code:<script type="text/javascript"> function disableSelection(target){ if (typeof target.onselectstart!="undefined") //IE route target.onselectstart=function(){return false} else if (typeof target.style.MozUserSelect!="undefined") //Firefox route target.style.MozUserSelect="none" else //All other route (ie: Opera) target.onmousedown=function(){return false} target.style.cursor = "default" } </script>
Code:</body> <script type="text/javascript"> disableSelection(document.body) </script> <script type="text/javascript"> var somediv=document.getElementById("layer1") disableSelection(somediv) </script>



Reply With Quote

Bookmarks