Re: Prevent user copy + pasting from one field to next

Giganews Newsgroups
Subject: Re: Prevent user copy + pasting from one field to next
Posted by:  Dr John Stockton (j…
Date: Thu, 14 Sep 2006

JRS: In article <1158230051.639270.345…>,
dated Thu, 14 Sep 2006 03:34:11 remote, seen in
news:comp.lang.javascript, emma.s… posted :
>I have a form where we would like the user to input their email address
>twice, to ensure they've typed it correctly, as is found on most
>I'm looking for a solution to the problem where a user (and me it has
>to be said) just either highlights the email address with their mouse
>(or Ctrl-A) and then Ctrl-C, Ctrl-P (or right-click copy, right-click
>paste) into the next field down.
>How would I go about this in JavaScript, or is there another solution?

It's too late for me to test this tonight, but how about using one of
the onXXXX operations to examine the timing of the entries?

Needs to do both, unless you force entering the first one first.

Even a trained typist cannot type an entry as fast as copy'n'paste
enters it.

Anything in javascript may be defeated by using a forged page; but you
are presumably considering only moderately co-operative clients.

Thought : can onSubmit send a checksum of body innerHTML - probably -
execute    document.write(document.body.innerHTML)  in my js-quick.htm!

It's a good idea to read the newsgroup and its FAQ.

© John Stockton, Surrey, UK.  ?  Turnpike v4.00  IE 4 ©
<URL>? JL/RC: FAQ of news:comp.lang.javascript
<URL> jscr maths, dates, sources.
<URL> TP/BP/Delphi/jscr/&c, FAQ items, links.


In response to

Prevent user copy + pasting from one field to next posted by emma.s… on 14 Sep 2006