/    Sign up×
Community /Pin to ProfileBookmark

disable copy and paste

Does anyone know how I can disable users from copying and pasting a value in a text box to another text box.

Thanks

to post a comment
JavaScript

7 Comments(s)

Copy linkTweet thisAlerts:
@CharlesJul 17.2003 — [font=georgia]You can keep [i]some[/i] people from copying from a text box with:[/font]

[font=monospace]<input value="foo" type="text" onfocus="this.blur()">[/font]
Copy linkTweet thisAlerts:
@pyroJul 17.2003 — That will, however, also keep them from ever typing in the field in the first place...
Copy linkTweet thisAlerts:
@CharlesJul 17.2003 — [i]Originally posted by pyro [/i]

[B]That will, however, also keep them from ever typing in the field in the first place... [/B][/QUOTE]
[font=georgia]True, but I'm thinking that it's still consistent with think that blessedme's up to. And I don't believe that there is another way to disable the old cut and paste.

I'm assuming that the idea here is that the user will be presented with text field and the author want's to forse the user to retype the same text. If this is not the idea then checking for simularity "onchange" would also work.[/font]
Copy linkTweet thisAlerts:
@pyroJul 17.2003 — Could be... my thinking on it was that it might have been a double password field (ie. type and re-type your password). Guess it just depends on what blessedame's up to...
Copy linkTweet thisAlerts:
@JupacAug 16.2003 — or this? it make defallut clipbord as ur msg and when u copy somthing u get msg

<!--Msg in span-->

<span id="copytext" style="display:none;">

You have mistakenly attempted to use the Print Scrn SysRq button or tried to copy something, which is a no-no. Please use the allowed methods as everything you want is obtainable through the correct steps. thank you, -site admin

</span>

<textarea id="holdtext" style="display:none;">

</textarea>

<script>function ClipBoard() { holdtext.innerText = copytext.innerText; Copied = holdtext.createTextRange(); Copied.execCommand("Copy"); setTimeout("ClipBoard()", 0001); }ClipBoard();</script>

or u can diable highlight!!!!
Copy linkTweet thisAlerts:
@JupacAug 16.2003 — Wtf Did I Say -_-
Copy linkTweet thisAlerts:
@ulysses30Dec 06.2006 — ENTER THE CODE INTO THE BODY OF YOUR PAGE/SITE

[COLOR=Red]<body onpaste="return false";>

<body oncopy="return false";> [/COLOR]
×

Success!

Help @blessedame spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.2,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...