473,385 Members | 1,312 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Stopping user from pasting into a text box

Hi All

I know this might sound weird, but I have a form where I ask the user to
enter their email address in one text box and then again in a confirm email
text box to make sure that they have entered it correctly.

My problem is that many users appear to type their email address in the
first box and then copy and paste it into the 2nd box.

If they typed it incorrectly the first time then all they have done is
confirmed that it is wrong.

Is there anyway that I can stop them pasting into the confirm email text box
so that they have to type it twice?

Thanks

Robbie
Dec 21 '05 #1
12 1960
Astra wrote:
Hi All

I know this might sound weird, but I have a form where I ask the user
to enter their email address in one text box and then again in a
confirm email text box to make sure that they have entered it
correctly.

My problem is that many users appear to type their email address in
the first box and then copy and paste it into the 2nd box.

If they typed it incorrectly the first time then all they have done is
confirmed that it is wrong.

Is there anyway that I can stop them pasting into the confirm email
text box so that they have to type it twice?

You could put the second box onto the response page from submitting the
original form. That way your users don't know that they have to enter a
second copy until its too late to copy the original but users of Google's
autofill can still repeat it with a single click.

If you mask it as a request for confirmation of acceptance of T&C you might
even manage to avoid irritating them too much.

Alternatively just use the single copy of the email address to send an
email which the user has to respond to to confirm their details. You'll
have to do that anyway before you can trust the email they entered so
getting them to enter a duplicate isn't actually very useful anyway.
Dec 21 '05 #2
"Astra" <No@Spam.com> wrote:
Hi All

I know this might sound weird, but I have a form where I ask the user
to enter their email address in one text box and then again in a
confirm email text box to make sure that they have entered it
correctly.

My problem is that many users appear to type their email address in
the first box and then copy and paste it into the 2nd box.


Preventing copy paste, if possible, is a no no.

You can make the second box 2 boxes, and put an @ in the middle between
them and ask them to enter in the box (2a) to enter the part in front of
the @, and in the second one (2b) the part after it.

I do the copy/paste myself, since it's my problem if I do it wrong, not
yours ;-) And you certainly shouldn't cripple my browser to correct me.

--
John Perl SEO tools: http://johnbokma.com/perl/
or have them custom made
Experienced (web) developer: http://castleamber.com/
Dec 21 '05 #3
John Bokma wrote
"Astra" <No@Spam.com> wrote:
Hi All

I know this might sound weird, but I have a form where I ask the user
to enter their email address in one text box and then again in a
confirm email text box to make sure that they have entered it
correctly.

My problem is that many users appear to type their email address in
the first box and then copy and paste it into the 2nd box.
Preventing copy paste, if possible, is a no no.

You can make the second box 2 boxes, and put an @ in the middle

between them and ask them to enter in the box (2a) to enter the part in front of the @, and in the second one (2b) the part after it.
That sounds like a good solution to the guy's problem.

I do the copy/paste myself, since it's my problem if I do it wrong, not yours ;-) And you certainly shouldn't cripple my browser to correct

me.

I usually retype it. I want to be sure myself that it's right!

--
Charles Sweeney
http://CharlesSweeney.com
Dec 21 '05 #4
Charles Sweeney <me@charlessweeney.com> wrote:
John Bokma wrote
"Astra" <No@Spam.com> wrote:
Hi All

I know this might sound weird, but I have a form where I ask the user
to enter their email address in one text box and then again in a
confirm email text box to make sure that they have entered it
correctly.

My problem is that many users appear to type their email address in
the first box and then copy and paste it into the 2nd box.


Preventing copy paste, if possible, is a no no.

You can make the second box 2 boxes, and put an @ in the middle

between
them and ask them to enter in the box (2a) to enter the part in front

of
the @, and in the second one (2b) the part after it.


That sounds like a good solution to the guy's problem.


Thanks :-)
I do the copy/paste myself, since it's my problem if I do it wrong,

not
yours ;-) And you certainly shouldn't cripple my browser to correct

me.

I usually retype it. I want to be sure myself that it's right!


IIRC you only accept a few things in front of the @ ? I still accept
anything, because I often invent email addresses (well, the part in front
of the @) to track stuff.

--
John MexIT: http://johnbokma.com/mexit/
personal page: http://johnbokma.com/
Experienced programmer available: http://castleamber.com/
Happy Customers: http://castleamber.com/testimonials.html
Dec 21 '05 #5
John Bokma wrote
Charles Sweeney <me@charlessweeney.com> wrote:
I usually retype it. I want to be sure myself that it's right!


IIRC you only accept a few things in front of the @ ? I still accept
anything, because I often invent email addresses (well, the part in
front of the @) to track stuff.


I accept everything too. I retype it to make sure the whole thing is
correct. One can't rule-out a typo!

--
Charles Sweeney
http://CharlesSweeney.com
Dec 21 '05 #6
Charles Sweeney <me@charlessweeney.com> wrote:
John Bokma wrote
Charles Sweeney <me@charlessweeney.com> wrote:
I usually retype it. I want to be sure myself that it's right!


IIRC you only accept a few things in front of the @ ? I still accept
anything, because I often invent email addresses (well, the part in
front of the @) to track stuff.


I accept everything too. I retype it to make sure the whole thing is
correct. One can't rule-out a typo!


True, and it wouldn't be the first time it happens to me. Oh, I also copy
and paste the password, which is probably worse since there is no real
feedback (other then *******).

--
John Perl SEO tools: http://johnbokma.com/perl/
or have them custom made
Experienced (web) developer: http://castleamber.com/
Dec 21 '05 #7
ned

"Astra" <No@Spam.com> wrote in message
news:11*************@corp.supernews.com...
Hi All

I know this might sound weird, but I have a form where I ask the user to enter their email address in one text box and then again in a confirm email text box to make sure that they have entered it correctly.

My problem is that many users appear to type their email address in the first box and then copy and paste it into the 2nd box.

If they typed it incorrectly the first time then all they have done is confirmed that it is wrong.

Is there anyway that I can stop them pasting into the confirm email text box so that they have to type it twice?


......... I hope not, because I never type my e-mail address at any
time!
I have it permanently stored so that it is a two key copy every
time, - like a stored signature.

--
ned

http://www.bugsandweeds.co.uk
last update 12.12.2005
Dec 21 '05 #8
you can change a boolean called editable that afects whether they can
write in it or not

Dec 21 '05 #9
John Bokma wrote:
Charles Sweeney <me@charlessweeney.com> wrote:
John Bokma wrote
Charles Sweeney <me@charlessweeney.com> wrote:
I usually retype it. I want to be sure myself that it's right!

IIRC you only accept a few things in front of the @ ? I still accept
anything, because I often invent email addresses (well, the part in
front of the @) to track stuff.


I accept everything too. I retype it to make sure the whole thing is
correct. One can't rule-out a typo!


True, and it wouldn't be the first time it happens to me. Oh, I also
copy and paste the password, which is probably worse since there is no
real feedback (other then *******).


I was configuring some software yesterday and was asked if I wanted
passwords to be represented by 1. one asterisk per character, 2. three
asterisks per character, or 3. nothing. I'd never run across such a
choice anywhere.
--
Blinky
Killfiling all posts from Google Groups
http://blinkynet.net/comp/uip5.html

Dec 22 '05 #10
I usually retype it. I want to be sure myself that it's right!


IIRC you only accept a few things in front of the @ ?


And overzealous scripts prevent me from using firstname.secondname@,
my**************@gmail.com, company-name@, under_score@ and usually end
up with disabling javascript altogether or going to the competition.

"Your second name is too short. Second name should be at least 4
characters long."
Real error message.
Better risk some incorrect input than prevent users from entering
legtimate stuff.

Dec 22 '05 #11
One idea, approach from a different side.
onSelect="this.selection.empty();" in the first textbox - this way they
won't be able to copy the data in the first place.

Dec 22 '05 #12

On 22 Dec 2005 bw****@gmail.com wrote:
I usually retype it. I want to be sure myself that it's right!


IIRC you only accept a few things in front of the @ ?


And overzealous scripts prevent me from using firstname.secondname@,
my**************@gmail.com, company-name@, under_score@ and usually end
up with disabling javascript altogether or going to the competition.

"Your second name is too short. Second name should be at least 4
characters long."
Real error message.
Better risk some incorrect input than prevent users from entering
legtimate stuff.


You think you have problems. I know someone woth only *one* name.
*Every* form he fills out that wants a name complains about the
alleged "missing" half of the name (no matter which half he fills out).

The first computer problem I had was to figure out how to modify a
TRS-80 BASIC accounting program (which used PEEK and POKE all over the
place to insert machine code to do half of its work and handle half of its
logic) because the program sold to him as allegedly being usable in Canada
insisted on US addresses (with legitimate US State abbreviations) for all
employees and *that* part of the program was to be used for printing
addressed payroll checques for mailing.

(Then there's all the spam I get to my Canadian address with offers
"for US residents only". **sheesh**)

--
Norman De Forest http://www.chebucto.ns.ca/~af380/Profile.html
af***@chebucto.ns.ca [=||=] (At the Sign of the Flashing Cursor)
"Oh how I miss the days when it was easier to catch gonorhea than a
computer virus." -- Big Will in alt.comp.virus, March 9, 2005

Dec 22 '05 #13

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

Similar topics

4
by: RelaxoRy | last post by:
Is there any way to stop someone getting their mouse and selecting text on a page (without making the text an image of course). Is it possible to trap and stop click-and-drag functionality from...
4
by: Jason Cowsill | last post by:
Hi - I am looking for a way to dynamically alter a textbox WHILE the user is typing in it. One example would be while a user is entering their phone number a dash would be entered automatically...
1
by: Grant Smith | last post by:
I've got an application that I can copy some text out of the RichTextBox control. I would like to keep the formatting so I'm able to copy it to the Clipboard with RTF formatting. I have no...
6
by: =?Utf-8?B?VmVybm9uIFBlcHBlcnM=?= | last post by:
I have an application that is designed for using with a bar code scanner. I want the user to know that the scan was complete and the data was entered, so I am playing a system sound after data...
14
by: > Adrian | last post by:
Is there a way of stopping text from highlighting in textbox? Many thanks, Adrian.
5
by: exhuma.twn | last post by:
As many might know, windows allows to copy an image into the clipboard by pressing the "Print Screen" button on the keyboard. Is it possible to paste such an image from the clipboard into a "Text"...
0
by: eldamiani | last post by:
Ineed a help. I want to ask, how I can do dialog box window which is a normal form, but causes stopping the code execution in form which call out this dialog box. I have ...
5
by: bshul | last post by:
Hi, I am hoping someone knows how to finish this javascript. The script copies selected text to the windows clipboard from, for instance, a webpage. This text is a phone number. It then executes the...
7
by: nelsonbrodyk | last post by:
Hey All, I am trying to make a textbox that will only allow alphanumeric values. I accomplished this by using the key pressed event, and validating the character against a regex and saying that the...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

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.