Search this site:


Categories:

August 12, 2004 12:01 AM

Broken: Claritin e-mail confirm box

claritin_email_confirm_boxCharles Brenna writes:

I found this on the Claritin site. After entering my email address to register for a free air purifier, I got this e-mail confirmation alert box:

    Is your email address correct?

    OK=Yes - Cancel=No

Wouldn't it have been simpler just to use "yes" and "no" - or "confirm" and "re-enter" - for the buttons?

Comments:

that's a limitation of javascript.

Posted by: goofball at August 12, 2004 12:25 AM

It's not their fault. Clearly the author WANTED to do good by having YES/NO buttons, but could not. I have encountered this myself, and it's not just Javascript, but VBscript as well.

Posted by: nonono at August 12, 2004 08:44 AM

That kind of message box is completely useless anyway - the user simply doesn't bother to check information being submitted.

I've also seen sites use two entry fields: 'email address' and 'confirm email address'. What do I do? Type it once, then paste it into the other box. If I mistyped it once, the software won't pick it up.

Posted by: Mike Dimmick at August 12, 2004 09:08 AM

"that's a limitation of javascript." isn't really a very good excuse. "Clearly the author WANTED to do good by having YES/NO buttons", but given that it is a limitation of javascript, then the design does not match with the capability of the tool.

Posted by: Carlos Gomez at August 12, 2004 09:45 AM

So? At least the author of the program actually told you that OK=Yes and Cancel=No. Some of these software things that I've seen on This Is Broken have confirmation dialog boxes that have only one button. Not broken

Posted by: lane at August 12, 2004 11:15 AM

Continuing what Mike said, many browsers have an auto-complete feature. When I need to put an email in, I type it once, and my browser retypes it for me after I've typed the first letter in the confirmation box.

Posted by: never mind that at August 12, 2004 11:38 AM

The buttons are *always* labeled OK and Cancel, those can't be changed. That's just how window.confirm() works.

I always laugh at the "confirm e-mail address" fields. Whoever wrote that is obviously copying the "password"/"confirm password" system, without realizing why there is a "confirm password" field - it's because the password is masked. Unless the e-mail address field is masked it's useless to have a confirm field.

Posted by: Jacques Troux at August 12, 2004 01:44 PM

It probably would have been better to handle this on the server end, rather than using Javascript. That way they'd have much more flexibility with the options, and people who'd turned off Javascript in their browsers could still sign up...

Posted by: webmacher at August 12, 2004 03:51 PM

Actually, VBScript can call ShowMessageBox and pass the buttons to be set. However, fewer people run VBScript so...

A better way to deal with this would be to simply rephrase the question so that the buttons make sense.

Posted by: Michael Giagnocavo at August 12, 2004 04:41 PM

That's a limitation of javascript? Hardly. No one says you have to use window.confirm(). The limitation is with the author.

For example, you could have a checkbox to check confirming you checked your email, before you even submit the form.

If you wanted a dialog, you could have a pop-up show an HTML form with a "Confirm" and "Change" (or whatever) buttons.

Or, you could have the submit button bring the user to a summary page showing all the information as it would be submitted and asking him to confirm all of the information.

Javascript can do all these things.

Posted by: icouldbeanyone at August 12, 2004 09:33 PM

Thank you Michael Giagnocavo, you took the word right out of my mouth... not literally.

Posted by: Nathan Hughes at August 13, 2004 04:08 PM

Of course, if you wanted to, you could make another HTML page with links saying "yes" and "no". You could even have pictures, animations, etc.

But who says you have to? It's a lot easier to program this way...

While we're on the subject of javascript, you could always make a pop-up window with only an "Ok" button and no "Cancel" button. Then have it say "If you would like to install spyware on your computer, press Ok. If not, press Cancel." That'd be a good idea for a practical joke...

Posted by: Shadow at August 13, 2004 04:56 PM

I would just rephrase the question to fit with an OK/Cancel response instead of a Yes/No response.

Posted by: James Craig at August 13, 2004 09:47 PM

> If you wanted a dialog, you could

> have a pop-up show an HTML form with

> a "Confirm" and "Change" (or whatever)

> buttons.

But it's not a real dialog, no matter how much you try to make it one. It's a new browser window, and for many reasons that can be problematic:

1. Pop-up blockers.

2. Tabbed browsers may open it in a new tab, possibly in the background and without focus.

3. Non-modality.

4. No guarantee of that the browser's toolbar, address, and statusbar widgets are hidden.

The inability to specify the buttons in a JavaScript confirmation dialog /is/ a limitation with JavaScript. There are workarounds, yes, but it doesn't make window.confirm any less crippled.

Posted by: James at August 16, 2004 02:58 PM

Just as a real-life situation and solution, and also in response to Jacques...

On one of my corporate sites, I asked users to fill out profile information - asking for the very important email address only once.

Despite technologies like browser autocomplete and Google's AutoFill, about 1 in 100 users still incorrectly entered their email address. It was usually silly and obvious typos like someone@microoft.com.

So I added the annoying Enter Email Again text box. Since then I have not had anyone enter their email address incorrectly. Not sure if a popup/dialog/html form would have a similar affect, but this is what has worked for me.

Posted by: David Garcia at August 17, 2004 04:01 PM

The proper way to handle e-mail confirmation is to have two text boxes where the user independently enters his/her e-mail address twice, and the underlying script makes sure the text is the same in both boxes, returning a user-friendly error if the text doesn't match (usually refreshing the page, highlighting the problem in red, and giving a short message instructing the user what the problem was and how to fix it).

Posted by: QAChick at August 20, 2004 07:37 AM

"Nonono" -- VBScript does not have that limitation. You just pass the vbYesNo constant to the msgbox function, and it relabels the buttons.

Instead of this Javascript:

bConfirm = confirm("Really?")

It's this VBScript:

bConfirm = msgbox("Really?", vbYesNo)=vbYes

If you want to do Yes/No/etc in Javascript, look at http://slingfive.com/pages/code/jsMsgbox/ for a nearly identical msgbox implementation.

Posted by: Rob at September 3, 2004 02:21 AM

Regarding verifying an email address: Isn't it possible for the underlying software to query the target domain (e.g. the "domain.com" in MyEmailAddress@comain.com) to determine whether the specified email adress ("MyEmailAddress" in this example) to determine whether the email address is valid, without actually transmitting an email? So if it finds that no such domain exists or no such email address exists on the target domain it could tell the user immediately that it's an invalid email address? That won't help when the user mistypes his email address as someone else's perfectly valid email address, but I'd bet it would catch a lot of mistyped addresses.

Posted by: Roger at September 13, 2004 06:02 PM

Actually, as has already been hinted at, I have had the same problem and my solution was to phrase the confirmation box test like this:

"Your email address appears to be invalid, please click OK only if you sure it is correct."

Posted by: Tony Steer at December 12, 2004 08:00 AM

Yo, Rob VB script won't help out non-IE users. Like me and my Linux box here. VB script is not an internet standard, it's strictly a way for B. Gates to get richer.

If Claritin wants to sell to Mac users (who may have IE installed but the Mac version of IE doesn't support VB script) or Linux users who are guaranteed not to, or anyone not using IE on Windows... they'd best follow other advice.

Posted by: billc at December 14, 2004 02:03 PM

Comments on this entry are closed



Previous Posts: