Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 Development Tools
 stop copy paest
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Yak Posting Veteran

65 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;


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

Most Valuable Yak

15732 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  
 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.02 seconds. Powered By: Snitz Forums 2000