473,732 Members | 1,991 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Prevent user copy + pasting from one field to next

Hi all,

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
sign-ups

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?

If it were up to me, I'd use just one box for the email address - but
it isn't, so it has to be done twice.

Thanks

M

Sep 14 '06 #1
17 5477

em******@gmail. com wrote:
Hi all,

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
sign-ups

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?
The only way to prevent copy & paste to a second field is to not have a
second field. :-)

--
Rob

Sep 14 '06 #2
The only way to prevent copy & paste to a second field is to not have a
second field. :-)
:) mm, I realise it's a pretty dumb question - but is there any
javascript solution.

Sep 14 '06 #3
rf
em******@gmail. com wrote
>
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
sign-ups

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.
Hmmm. This user is filling out this form in anticipation of receiving emails
from you?

If they do it incorrectly, by either copy/pasting drag/dropping an incorrect
address or even typing an incorrect address twice then is it not *their*
problem? Even if you do everything in your power to protect yourself against
fools then very shortly a better fool will come along :-)

--
Richard.
Sep 14 '06 #4

rf wrote:
Hmmm. This user is filling out this form in anticipation of receiving emails
from you?
yes, it's a sign up process
If they do it incorrectly, by either copy/pasting drag/dropping an incorrect
address or even typing an incorrect address twice then is it not *their*
problem? Even if you do everything in your power to protect yourself against
fools then very shortly a better fool will come along :-)
very much agreed, but it is a company decision to use 2 boxes and not
mine!

I was hoping there was a javascript solution to this - if anyone can
point in the direction of what methods i might use etc?

Sep 14 '06 #5
rf
em******@gmail. com
>
rf wrote:
>Hmmm. This user is filling out this form in anticipation of receiving
emails
from you?

yes, it's a sign up process
Thought so :-)
>If they do it incorrectly, by either copy/pasting drag/dropping an
incorrect
address or even typing an incorrect address twice then is it not *their*
problem? Even if you do everything in your power to protect yourself
against
fools then very shortly a better fool will come along :-)

very much agreed, but it is a company decision to use 2 boxes and not
mine!
So, look around. Many sign up processes uses two boxes. None of these (that
I have seen) prohibit copy/paste etc. Why should yours? Is this a "boss
directive" that you disallow copy/paste etc? If so then you should advise
your boss accordingly.

Or are you inventing a problem that everybody else has simply ignored? It is
IMHO not your problem. If somebody willingly duplicates an incorrect address
then that person is not really using your sign up process correctly. I for
one *like* the two boxes, it checks for my typos and *I* never copy/paste.
What would be the point?
I was hoping there was a javascript solution to this
I really don't think there is one.
- if anyone can
point in the direction of what methods i might use etc?
Carrying on from my previous comments, if you can stop every browser from
allowing this copy/paste etc in all its variations then the day after
tomorrow some browser will provide a different method of duplicating the
content of those boxes.

Once again, if your user stuffs up their sign-up process it is IMHO that
users fault, not yours.

I run several opt-in email lists. If a user signs up with an incorrect email
address and it bounces just once then they are out.

--
Richard.

Sep 14 '06 #6

rf wrote:
So, look around. Many sign up processes uses two boxes. None of these (that
I have seen) prohibit copy/paste etc. Why should yours? Is this a "boss
directive" that you disallow copy/paste etc? If so then you should advise
your boss accordingly.
I guess I'm going to have to!
Or are you inventing a problem that everybody else has simply ignored?
Yeah, it isn't really a problem at all - not in the grand scheme of
forms.
Once again, if your user stuffs up their sign-up process it is IMHO that
users fault, not yours.
Ok, brilliant Richard. Thanks for all your information.

Sep 14 '06 #7

rf wrote:
em******@gmail. com
So, look around. Many sign up processes uses two boxes. None of these (that
I have seen) prohibit copy/paste etc. Why should yours?
Clearly you don't get around much. More and more sites attempt to
prevent pasting when entering important information twice. Travel
billing, banks, and even state DMV's asking for vehicle info, they all
do it.
I was hoping there was a javascript solution to this
Google for the "onbeforepa ste" event, at least for IE users.

Cheers - Kev

Sep 14 '06 #8

Kevin Darling wrote:
rf wrote:
em******@gmail. com
So, look around. Many sign up processes uses two boxes. None of these (that
I have seen) prohibit copy/paste etc. Why should yours?

Clearly you don't get around much.
Actually, that was a bit harsh of me, although you were really giving
the OP grief :-). Perhaps you never noticed all the sites that do
this, because you use a browser that doesn't allow stopping a paste.

In any case, it's a very smart move, especially on sites where you have
to enter long series of numbers. Entering a credit card number comes
to mind.

Cheers - Kev

Sep 14 '06 #9

Kevin Darling wrote:
Google for the "onbeforepa ste" event, at least for IE users.
Thanks, Kevin. I'll probably try implementing it for IE users and
it'll just be open for everyone else.

Sep 14 '06 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2691
by: The Fox | last post by:
How to prevent user to add web reference to my web services? Can I add password to web services so that only the users who know the password can add a web reference? Thanks in advance.
1
5730
by: User | last post by:
Hi, Are there ways to let browser forget about the previous submitted form data? Or prevent user from pressing F5 to submit the same form again Or prevent user from presising back on the browser? Please advise.
3
2041
by: elainenguyen | last post by:
I want to add a new record and then copy the field DCDate over to the new record, but when I click on the command button it only adds a new record, but didn't copy the DCDate over. Can any body help? here is my code. Private Sub cmdAddNew_Click() DoCmd.GoToRecord , , acNewRec !! = Me.txtDCDate !!.SetFocus End sub
4
1758
neo008
by: neo008 | last post by:
Hi All, Can I prevent user to press cross button? I want to disable all three buttons for minimize, maximize and close for parent as well as child window. Is it possible? I'm using VB6. Can somebody help in this.
4
6656
by: Luqman | last post by:
How can I Prevent user from accessing any page directly without Login ? User should not be able to by pass the Login screen by typing the Url of any page directly. I am using ASP.Net 2.0 with Visual Studio 2005. Best Regards, Luqman
5
21094
by: alvintiow | last post by:
Hi, I intend to use barcode for input and prevent user to modify the barcode they scan, user are not allow to input the barcode number by keyboard. Please advise how to do this. Thanks.
0
1459
by: helveticus | last post by:
I have a master/details configuration that includes multiple user controls. The details page is configured to cache data via VaryByCustom. This works fine. One of the user controls contains an image button. With caching turned on, the control remains "lame" since the control is only dynamically generated during the first access. My understanding is that page caching directive causes all page user controls to be implicitly cached as...
0
1334
by: Appyks | last post by:
How Do I prevent User from Locking the System? Obviously I can set following Windows registry value But it doesn’t serve my propose "DisableLockWorkstation"=dword:00000001 I need something as the code follows in here using System;
0
988
by: Roger Davies | last post by:
I have a Userform in VBA 2007 Excel on which I have several textboxes and a listbox. I am able to initiate the drag and drop but cannot work out how to prevent user from dropping the data into the wrong textboxes. I have searched the net but cannot find the answer to what must be a common problem. Can anyone help? - Please!!
0
8944
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9445
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9306
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9234
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6030
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4548
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4805
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3259
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2721
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.