View Single Post
Old 02-06-2011, 11:44 PM  
SmokeyTheBear
►SouthOfHeaven
 
SmokeyTheBear's Avatar
 
Join Date: Jun 2004
Location: PlanetEarth MyBoardRank: GerbilMaster My-Penis-Size: extralarge MyWeapon: Computer
Posts: 28,609
i posted a demo here awhile ago.

Code:
<SCRIPT type="text/javascript"> 
var bResult;
function fC(){
event.returnValue = false;
var cstr=document.selection.createRange().text;
bResult = window.clipboardData.setData("Text",cstr + " Courtesy of <a href='"+document.location.href+"'>"+document.title+"</a>");
	
}
</script>
place that in head.. then add the even handler oncopy="fC();" to the container holding your text..

such as <div id=mytext oncopy="fC();"> some words i want to protect </div>
__________________
hatisblack at yahoo.com
SmokeyTheBear is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote