SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Development Tools
 ASP.NET
 stop copy paest
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

chiragvm
Yak Posting Veteran

India
60 Posts

Posted - 11/02/2006 :  10:06:40  Show Profile  Reply with Quote
hi to all

i want to stop peast in my webpage's textbox
<script type="text/javascript" >

var sSave = "";
function fnBeforeCut() {
event.returnValue = false;
}

function fnCut(id) {
event.returnValue = false;
sSave = id.innerText;
id.innerText = "";
}

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

robvolk
Most Valuable Yak

USA
15636 Posts

Posted - 11/02/2006 :  10:13:00  Show Profile  Visit robvolk's Homepage  Reply with Quote
Maybe posting your question on a JavaScript site would be better, SQL Team is primarily a SQL Server site. I know that IE's JavaScript model is different from the standard.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.16 seconds. Powered By: Snitz Forums 2000