function fnBeforePaste() { event.returnValue = false; }
function fnPaste(id) { event.returnValue = false; id.innerText = sSave; }
</script> use this script in html textbox
when asp:textbox txtcpassword.Attributes.Add("onSelectStart", "return false;") txtcpassword.Attributes.Add("onPaste", "return false;")use this code it working fine in intenetexplorer(microsoft) but not work in firefox please give me a solution it's urgent
1. this is a forum for working scripts. 2. you haven't provided the way you're using your functions. 3. download aptana: http://weblogs.sqlteam.com/mladenp/archive/2006/07/31/10914.aspx 4. use it to develop the javascript there because it shows you which functions will work in IE, FF, Opera, etc 5. google returns nothing?
Disabling cutting and pasting on a web page sounds like you are inventing a problem to find a solution for.
In addition, a user can always disable javascript, don't forget, or use other tricks to circumvent such "features" on your pages. Any time you try to implement any sort of security at the client you are vulnerable to hacks.