Alert????

D

Dr J R Stockton

In comp.lang.javascript message <83e90c08-bb1e-4942-8a70-7fa5ba510145@s3
7g2000prg.googlegroups.com>, Tue, 4 Mar 2008 11:01:48,
(e-mail address removed) posted:
I am actually writing date validation.

If you had read the newsgroup FAQ with reasonable care before the
relevant line was removed, you would have been lead to a much more
concise way of validating a numeric Y M D date in JavaScript. See
below.

A Google search for JavaScript date validation will soon show that
there's no need to write new bad code, since the Web offers plenty; and
will give you an idea of the quality of the average web tutorial.

It's a good idea to read the newsgroup c.l.j and its FAQ. See below.
 
T

Thomas 'PointedEars' Lahn

Tim said:
Tim said:
[...] Thomas 'PointedEars' Lahn [...] wrote:
Doug Miller wrote:
[...] (e-mail address removed) wrote:
I am actually writing date validation. Here is the scripting part:

// Date Validation for Today's Date (date should be in mm/dd/yyyy
form)
Date input formats on an international medium like the Web should follow
internationally standardized formats, such as ISO 8601 (YYYY-MM-DD), or
provide a control for every date component.
No, I want it in my local format.
Irrelevant. Several million other people have ISO 8601 as their local
format. However, L10n could include an option for user-defined display.
The point was, it is a bad idea for a Web application to use the localized
format *by default*.

Why? I would call it a good idea for the page to consult my local
settings for date format display.

But AFAIK it cannot. And I meant the problem is that some Web authors
falsely assume that *their* local format is good for everyone.


PointedEars
 
J

Jeremy J Starcher

IBTD. It is the most efficient and most compatible one.

Efficient and compatible (coder-side) doesn't mean its not awkward and
annoying (user-end). I'll even agree its not alerts fault itself, but
rather the misuse of alert.
 
D

Doug Miller

Doug Miller wrote on 05 mrt 2008 in comp.lang.javascript:


You "ever" is wrong,
there are many instances where it is apropriate to do so.

Too bad you failed to provide any.
In medicine it is one of the first questions asked to estimate the
client/patient's desorientation.

Nonsense. While you're right about the question, you've completely
misunderstood its significance: the information being entered into the
medical record is not "today's date" but rather "what the patient THINKS is
today's date".

Strike one.
It could be used to correct errors with
the computer's clock off line,

Garbage. Correcting errors with the computer's clock would be done so by
setting the clock directly, not by entering the date into a form on a web
page.

Strike two.
or to set a virtual reality time in a
simulation.

A VR sim using javascript in a web browser?

Strike three. You're out.
 
D

Doug Miller

<
Pedant. This is of course going to be the case the vast majority of the time,
as you are doubtless aware. In any event it's certainly easy enough to display
what the computer thinks (is that better?) is today's date as a default value.

The point remains that requiring the user to type in *any* information that
can be determined in advance by the software, especially something so simple
and straightforward as today's date, is asinine.
Your conspicuous failure to address these points is noted without surprise.
 
E

Evertjan.

Doug Miller wrote on 06 mrt 2008 in comp.lang.javascript:
Too bad you failed to provide any.

Nonsense. While you're right about the question, you've completely
misunderstood its significance: the information being entered into the
medical record is not "today's date" but rather "what the patient
THINKS is today's date".

Strike one.


Garbage. Correcting errors with the computer's clock would be done so
by setting the clock directly, not by entering the date into a form on
a web page.

Strike two.


A VR sim using javascript in a web browser?

Strike three. You're out.

Your game is your private virtual reality.

I am glad for you, you feel happy having strikes.
However for me this is not a game,
not even a game I do not know or want to know,
I was talking about reality.
 
D

Dr J R Stockton

In comp.lang.javascript message <y%[email protected]
, Wed, 5 Mar 2008 23:27:29, Doug Miller <[email protected]> posted:
Correcting errors with the computer's clock would be done so by
setting the clock directly, not by entering the date into a form on a web
page.

Given the existence of portable computers and rapid transport, it is not
necessarily reasonable to assume that a computer is in fact set to give
"today's date", or that the appropriate value of "today's date" does or
does not correspond to the geographic location.

For example, a person based on Guam but briefly visiting Midway might
well prefer to leave his laptop set to Guam time (to avoid duplicated
and missing days; to get Guam-based work appropriately dated) but would
need the Midway date if interacting with Midway facilities.

Correspondingly for a Californian visiting Tokyo or Wellington.
 
I

Ian Hobson

Thomas said:
But AFAIK it cannot. And I meant the problem is that some Web authors
falsely assume that *their* local format is good for everyone.
Dates I can cope with. Mostly.

Its when damm fool US based web authors assume that international phone
numbers can be put in US format, or that everybody lives in a state that
I get pissed at them - that your phrase?

And why are these cretins ALWAYS American?

My response is simple - I don't buy.

Ian (in the UK - that the country of 60 million people, not the state.)
 
D

Doug Miller

In comp.lang.javascript message <y%[email protected]


Given the existence of portable computers and rapid transport, it is not
necessarily reasonable to assume that a computer is in fact set to give
"today's date", or that the appropriate value of "today's date" does or
does not correspond to the geographic location.

For example, a person based on Guam but briefly visiting Midway might
well prefer to leave his laptop set to Guam time (to avoid duplicated
and missing days; to get Guam-based work appropriately dated) but would
need the Midway date if interacting with Midway facilities.

Correspondingly for a Californian visiting Tokyo or Wellington.
A valid point -- which is exactly why I suggested that the computer's current
date be inserted into such fields as a default (implying the user's ability to
override it).

Requiring the user to enter information that is already known (or knowable) to
the computer is user-unfriendly to the point of asininity.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,602
Members
45,182
Latest member
BettinaPol

Latest Threads

Top